Created
February 3, 2014 15:48
-
-
Save rbirkby/8786337 to your computer and use it in GitHub Desktop.
Gets the physical directory of an IIS website into a DOS batchfile variable using PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
powershell -command "ipmo WebAdministration; (gi $(gi 'iis:\Sites\Default Web Site\VDIR').physicalpath).parent.fullname | write-host" > destinationtmp.txt | |
SET /p DESTINATION=<destinationtmp.txt | |
del destinationtmp.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment