[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ContentIndex\Catalogs\Web]
"Location"="D:\\Inetpub"
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\ContentIndex\Catalogs\Web]
"Location"="D:\\Inetpub"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\Web]
"Location"="D:\\Inetpub"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp]
"PathWWWRoot"="D:\\Inetpub\\wwwroot"
select * from objects where properties like '%C:\inetpub\wwwroot\wss\virtualdirectories\%'
#script start
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$SPSite = new-object Microsoft.SharePoint.SPSite("http://mywebapp:24333")
$WebApp = $SPSite.WebApplication
#IIS zone under which webapplication is created.
$IISSettings = $WebApp.IisSettings[[Microsoft.SharePoint.Administration.SPUrlZone]::Default]
#Change to new path
$IISSettings.Path = "D:\wss\VirtualDirectories\24333"
#update and dispose
$WebApp.Update()
$SPSite.Dispose()
#End powershell script
$WebApp.IisSettings[[Microsoft.SharePoint.Administration.SPUrlZone]::Default]
$WebApp.IisSettings[[Microsoft.SharePoint.Administration.SPUrlZone]::[b]Internet[/b]]
$WebApp.IisSettings[[Microsoft.SharePoint.Administration.SPUrlZone]::[b]Intranet[/b]]
For moving webapplication with Shared Service Provider(SSP) the zone will be default but the change will be in SP site object. It should be like this...
[code]$SPSite = new-object Microsoft.SharePoint.SPSite("http://mywebapp:24333/ssp/admin")
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)