팜 구성 설정 문서화(SharePoint Foundation 2010)
적용 대상: SharePoint Foundation 2010
마지막으로 수정된 항목: 2016-11-30
이 문서에서는 Windows PowerShell 2.0을 사용하여 팜의 구성 설정을 문서화하는 방법에 대해 설명합니다. 구성 설정을 문서화하는 작업은 환경에 대한 스크립팅된 배포를 만들고 오류가 발생할 경우 구성 집합을 빠르게 다시 만드는 데 반드시 필요합니다.
Windows PowerShell을 사용하여 구성 설정을 문서화하려면
최소 요구 사항을 충족하는지 확인합니다. 즉, Add-SPShellAdmin을 참조하십시오.
시작 메뉴에서 모든 프로그램을 클릭합니다.
Microsoft SharePoint 2010 Products를 클릭합니다.
SharePoint 2010 관리 셸을 클릭합니다.
메모장을 사용하여 텍스트 파일을 하나 만들고 다음 스크립트를 복사하여 파일에 붙여 넣습니다. 예제의 명령은 현재 팜의 웹 응용 프로그램 및 서비스 응용 프로그램 구성을 문서화하는 XML 파일을 만듭니다. 환경과 관련이 있는 명령만 선택하십시오.
## Common SharePoint configuration settings #Retrieve Web Application information. The default depth of 2 does not return much detail--we recommend that you use a depth of 4 for this cmdlet. Get-SPWebApplication | Export-Clixml .\ WebAppFilename.xml -depth 4 #Retrieve custom layout information. Get-SPWebApplication | Get-SPCustomLayoutsPage | Export-Clixml .\Get-SPCustomLayoutsPage.xml #Determine how SharePoint designer access is configured Get-SPWebApplication | Get-SPDesignerSettings | Export-Clixml .\Get-SPDesignerSettings.xml #Retrieve information about alternate access mapping Get-SPAlternateURL | Export-Clixml .\Get-SPAlternateURL.xml #Retrieve information about content databases Get-SPContentDatabase | Export-Clixml .\Get-SPContentDatabase.xml #Retrieve database properties for each database Get-SPDatabase | Export-Clixml .\Get-SPDatabase.xml #Retrieve information about all SharePoint Products installed in the farm, and the versions of all updates installed for each product. Get-SPProduct | Export-Clixml .\Get-SPProduct.xml #Retrieve farm information Get-SPFarm | Export-Clixml .\Get-SPFarm.xml Get-SPFarmConfig | Export-Clixml .\Get-SPFarmConfig.xml #Retrieve information about the servers in the farm Get-SPServer | Export-Clixml .\Get-SPServer.xml #Retrieve information about installed features Get-SPFeature | Export-Clixml .\Get-SPFeature.xml #Retrieve information about globally-installed site templates Get-SPWebTemplate | Export-Clixml .\Get-SPWebTemplate.xml #Retrieve information about deployed solutions Get-SPSolution | Export-Clixml .\Get-SPSolution.xml #Retrieve information about sandboxed solutions deployed in a site collection Get-SPSite | Get-SPUserSolution | Export-Clixml .\Get-SPUserSolution.xml #Retrieve information about installed Help Get-SPHelpCollection | Export-Clixml .\Get-SPHelpCollection.xml #Retrieve information about the logging levels that have been set Get-SPLogLevel | Export-Clixml .\Get-SPLogLevel.xml #Retrieve information about the sites in the farm Get-SPSite | Export-Clixml .\Get-SPSite.xml Get-SPSiteAdministration | Export-Clixml .\Get-SPSiteAdministration.xml Get-SPSiteSubscription | Export-Clixml .\Get-SPSiteSubscription.xml #Retrieve ULS logging information Get-SPDiagnosticConfig | Export-Clixml .\Get-SPDiagnosticConfig.xml Get-SPDiagnosticsPerformanceCounter | Export-Clixml .\Get-SPDiagnosticsPerformanceCounter.xml Get-SPDiagnosticsProvider | Export-Clixml .\Get-SPDiagnosticsProvider.xml #Retrieve information about accounts registered in the configuration database Get-SPManagedAccount | Export-Clixml .\Get-SPManagedAccount.xml Get-SPProcessAccount | Export-Clixml .\Get-SPProcessAccount.xml Get-SPShellAdmin | Export-Clixml .\Get-SPShellAdmin.xml #Retrieve information about the Mobile Messaging account. Get-SPWebApplication | Get-SPMobileMessagingAccount | Export-Clixml .\Get-SPMobileMessagingAccount.xml ##Common service infrastructure settings #Retrieve information about the service applications in the farm Get-SPServiceApplication | Export-Clixml .\Get-SPServiceApplication.xml Get-SPServiceApplicationPool | Export-Clixml .\Get-SPServiceApplicationPool.xml Get-SPServiceApplicationProxy | Export-Clixml .\Get-SPServiceApplicationProxy.xml Get-SPServiceApplicationProxyGroup | Export-Clixml .\Get-SPServiceApplicationProxyGroup.xml Get-SPServiceApplication | Get-SPServiceApplicationEndpoint | Export-Clixml .\Get-SPServiceApplicationEndpoint.xml #Retrieve information about the services running in the farm Get-SPServiceInstance | Export-Clixml .\Get-SPServiceInstance.xml #Retrieve information about common Web service settings Get-SPServiceHostConfig | Export-Clixml .\Get-SPServiceHostConfig.xml ## Common service application configurations #Application Discovery and Load Balancer Service Application Get-SPTopologyServiceApplication | Export-Clixml .\Get-SPTopologyServiceApplication.xml Get-SPTopologyServiceApplicationProxy | Export-Clixml .\Get-SPTopologyServiceApplicationProxy.xml #Business Data Connectivity Service #Retrieve information about data connection files. ###WARNING: The following cmdlet requires run as administrator rights Get-SPDataConnectionFile | Export-Clixml .\Get-SPDataConnectionFile.xml ###WARNING: The following cmdlet requires run as administrator rights Get-SPDataConnectionFile | Get-SPDataConnectionFileDependent | Export-Clixml .\Get-SPDataConnectionFileDependent.xml #Security Token Service Application #Retrieve information about the security token service used for incoming SOAP messages. Get-SPSecurityTokenServiceConfig | Export-Clixml .\Get-SPSecurityTokenServiceConfig.xml #Usage and Health data collection #Retrieve information about the Usage and Health Data Collection service application. Get-SPUsageApplication | Export-Clixml .\Get-SPUsageApplication.xml Get-SPUsageDefinition | Export-Clixml .\Get-SPUsageDefinition.xml Get-SPUsageService | Export-Clixml .\Get-SPUsageService.xml ###Note: These cmdlets are commented out because you are unlikely to want to run them. ### #Get-SPSite | %{$web=Get-SPWeb $_.Url;$webid=$web.Id;$web | Get-SPUser | Export-Clixml .\Get-SPUser-$webid.xml} # Get-SPSite | %{$web=Get-SPWeb $_.Url;$webid=$web.Id;$web | Export-Clixml .\Get-SPWeb-$webid.xml}
Windows PowerShell 콘솔에서 스크립트를 실행하려면 명령 프롬프트(PS C:\>)에서 C:\<path>\<filename>.ps1 명령을 입력한 후 Enter 키를 누릅니다.
자세한 내용은 Export-Clixml, Get-SPWebApplication, Get-SPServiceApplication을 참조하십시오.
cmdlet 사용 예제
이 섹션에서는 권장 cmdlet 중 하나를 사용할 수 있는 방법의 예제를 제공합니다.
Get-SPAlternateURL cmdlet은 대체 액세스 매핑에 대한 정보를 제공합니다. 이 cmdlet을 Export-Clixml cmdlet에 파이핑하면 XML 파일에 정보가 기록됩니다.
Get-SPAlternateURL | Export-Clixml .\Get-SPAlternateURL.xml
다음 섹션에는 Get-SPAlternateURL.xml 파일의 내용이 나와 있습니다. 일부 섹션은 축소되어 있습니다.
- <Objs Version="1.1.0.1" xmlns="https://schemas.microsoft.com/powershell/2004/04">
+ <Obj RefId="0">
- <Obj RefId="7">
<TNRef RefId="0" />
<ToString>Microsoft.SharePoint.Administration.SPAlternateUrl</ToString>
- <Props>
<S N="IncomingUrl">https://servername</S>
<URI N="Uri">https://servername/</URI>
+ <Obj N="UrlZone" RefId="8">
- <Obj N="Collection" RefId="9">
<TNRef RefId="2" />
- <IE>
- <Obj RefId="10">
<TNRef RefId="0" />
<ToString>Microsoft.SharePoint.Administration.SPAlternateUrl</ToString>
+ <Props>
- <MS>
<S N="Zone">Default</S>
<S N="PublicUrl">https://servername</S>
</MS>
</Obj>
</IE>
- <Props>
<I32 N="Count">1</I32>
<B N="IsReadOnly">false</B>
<S N="TypeName">Alternate Access Mapping Collection</S>
<S N="DisplayName">SharePoint - 80</S>
<U64 N="DiskSizeRequired">0</U64>
<B N="CanSelectForBackup">false</B>
<B N="CanRenameOnRestore">false</B>
<B N="CanSelectForRestore">false</B>
<S N="Name">SharePoint - 80</S>
<G N="Id">5b65a69a-222d-4fe0-904b-0fb928bc7a89</G>
<S N="Status">Online</S>
<S N="Parent">SPFarm Name=SERVERNAME_SharePoint_Configuration_Database</S>
<I64 N="Version">3661</I64>
+ <Obj N="Properties" RefId="12">
<TNRef RefId="3" />
<DCT />
</Obj>
<S N="Farm">SPFarm Name=SERVERNAME_SharePoint_Configuration_Database</S>
<Ref N="UpgradedPersistedProperties" RefId="11" />
</Props>
</Obj>
<Ref N="UpgradedPersistedProperties" RefId="11" />
</Props>
+ <MS>
+ <Obj N="Zone" RefId="13">
<TNRef RefId="1" />
<ToString>Default</ToString>
<I32>0</I32>
</Obj>
<S N="PublicUrl">https://servername</S>
</MS>
</Obj>
</Objs>
이 예제에서는 XML 파일에서 출력을 가져오므로 해당 내용을 보다 쉽게 확인할 수 있습니다.
Import-Clixml .\Get-SPAlternateURL.xml
XML 파일을 가져온 후에는 파이프라인의 개체를 지정된 형식의 실제 개체처럼 사용할 수 있습니다.
Import-Clixml .\Get-SPAlternateURL.xml | %{$_.Uri}
cmdlet의 일부분으로 개체를 파이핑하여 예상 속성, 메서드 및 TypeName을 모두 확인할 수도 있습니다. 다음 예제에서는 URI를 파이핑합니다.
Import-Clixml .\Get-SPAlternateURL.xml | %{$_.Uri | Get-Member}
자세한 내용은 Export-Clixml, Import-Clixml, Get-SPAlternateURL, ForEach-Object, Get-Member를 참조하십시오.