$ns
function enumNamespaces
{
write-host $ns
$Names = Get-WmiObject -namespace $ns -class __NameSpace | select name
foreach($n in $Names)
{
$ns = $ns + "\" + $n.Name
enumNamespaces
$ns = $ns.Replace("\" + $n.Name, "")
}
}
$ns = "root"
enumNamespaces
No comments:
Post a Comment