List Servers Running IIS

import-module activedirectory $servers=Get-ADComputer -Filter {operatingsystem -Like “Windows server*”} | select -ExpandProperty Name $servers | Out-File “<Change path to>\Servers.txt” -append default $serversall = (Get-Content “<Change path to>\Servers.txt”) Start-Transcript -path “<Change path to>\output.txt” -append default foreach($vm in $serversall) { $iis = get-wmiobject […]