Created
March 20, 2020 21:54
-
-
Save bmorrisondev/e2ff00f1b16dc0a902aa16c6ec9b5729 to your computer and use it in GitHub Desktop.
Check if an IIS Site exists using PowerShell
This file contains hidden or 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
if((Get-IISSite -Name "IisSiteName") -eq $true) { | |
# The site exists, do something | |
} else { | |
# The site doesnt exist. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment