Powershell - Pain Relief by R.T.Edwards
Tuesday, April 29, 2014
Powershell: How to enumerate through WMI Classes
$ns
function enumclasses
{
$classnames = Get-WmiObject -namespace $ns -class Meta_Class | select name
foreach($cn in $classnames)
{
write-host $cn.Name
}
}
$ns = "root\cimv2"
enumclasses
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment