Skip to content

Instantly share code, notes, and snippets.

@JohnL4
Last active April 21, 2020 15:37
Show Gist options
  • Select an option

  • Save JohnL4/59f1006c07522aa04e7afd3159bc084a to your computer and use it in GitHub Desktop.

Select an option

Save JohnL4/59f1006c07522aa04e7afd3159bc084a to your computer and use it in GitHub Desktop.
Fetch IIS Application Pool identities and Virtual Directories (and passwords!) to check that passwords used are correct and won't lock you out of the system due to high failure count
Import-Module WebAdministration;Get-ChildItem -Path IIS:\AppPools\ |
Select-Object name, state, managedRuntimeVersion, managedPipelineMode, @{e={$_.processModel.username};l="username"},
@{e={$_.processModel.password};l="password"}, @{e={$_.processModel.identityType};l="identityType"} |
format-table -AutoSize
# Also, to get virtual directories and auth credentials:
# (Need to select a new object to alias Path to AppPath, since VirtualDirectory also has a Path property)
#
get-iissite | sel -expand Applications | sel @{e={$_.Path};l="AppPath"} -expand VirtualDirectories |
sel AppPath, LogonMethod, UserName, Password | ft -auto -wrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment