![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | how to (1) change a IIS v5 "local path" and (2) windows service pa Can someone offer the powershell "easiest" way to: (1) change a IIS v5 "local path" from X to Y (2) change a windows service path from X to Y All on Windows XP. I need this so that i can use powershell to easily switch my applications (asp.net web services and installed windows services) from one branch to another to test. it's a real pain to have to manually go into IIS and reset the vdir location, uninstall the services and reinstall in the same location, etc. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: how to (1) change a IIS v5 "local path" and (2) windows servicepa Steve wrote: Quote: > Can someone offer the powershell "easiest" way to: > > (1) change a IIS v5 "local path" from X to Y > (2) change a windows service path from X to Y > > All on Windows XP. > > I need this so that i can use powershell to easily switch my applications > (asp.net web services and installed windows services) from one branch to > another to test. it's a real pain to have to manually go into IIS and reset > the vdir location, uninstall the services and reinstall in the same location, > etc. you're using the proper terminology? "windows services" kind of threw me off, for example. I'll try to dig into it a bit more over the weekend if nobody else helps out. Marco -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com |
My System Specs![]() |
| | #3 (permalink) |
| | Re: how to (1) change a IIS v5 "local path" and (2) windows service pa Hi Steve To change the "Local Path" path for the site try: $iis=[adsi]"IIS://localhost/W3SVC/1/Root" $iis.path = "yourPath" $iis.setinfo() To change a specific VirtualDir "Local Path" $vDir = $iis.psbase.children | where {$_.SchemaClassName -eq "IISWebVirtualDir" -and $_.AppRoot -match "VirtualDirName"} $vDir.Path = "yourPath" $vDir.setinfo() To change a service executable path: $svc = gwmi win32_service -filter "name='alerter'" $svc.change($null,"c:\windows\system32\cmd.exe",$null,$null,$null,$null,$null,$null,$null,$null,$null) ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Quote: > Can someone offer the powershell "easiest" way to: > > (1) change a IIS v5 "local path" from X to Y > (2) change a windows service path from X to Y > All on Windows XP. > > I need this so that i can use powershell to easily switch my > applications (asp.net web services and installed windows services) > from one branch to another to test. it's a real pain to have to > manually go into IIS and reset the vdir location, uninstall the > services and reinstall in the same location, etc. > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| "Extensible Authentication Protocol" service gives "The system cannot find the file specified" error | Vista networking & sharing | |||
| VBScript to Change only "maximum password age" in Local User Accou | VB Script | |||
| How to config "local machine"-->"personal" access right? | Vista General | |||
| How to change "require trusted path for credential entry" | Vista account administration | |||
| "Open command prompt here" and "Copy as path" | Vista performance & maintenance | |||