Get application Pool information -- Secure WMI by .NET


posted by Sylvain LESIRE
01-07-2009

Downloads: 372
File size: 321 B
Views: 3,942

Embed
Get application Pool information -- Secure WMI by .NET
  1. $server="ServerIIS" 
  2. $objWMI = [WmiSearcher] "Select * From IIsApplicationPoolSetting" 
  3. $objWMI.Scope.Path = "\\$server\root\microsoftiisv2" 
  4. $objWMI.Scope.Options.Authentication = [System.Management.AuthenticationLevel]::PacketPrivacy 
  5. $pools = $objWMI.Get() 
  6. $pools | foreach  {  
  7.     $_.name 
  8.     $_.CPUResetInterval 

This scripts shows you how to connect to MicrosoftIISV2 by using secure authentification level, and retreives application Pool informations.

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.