In powershell I can do a query like
> get-wmiobject -query 'select * from win32_groupuser' | % {[wmi]$_.partcomponent|select domain,name,SID}
Which will list for each wmi, the domain, name and sid for each user.
How would I accomplish this using vbscript?
I currently use execquery:
objWMIService.ExecQuery("select partcomponent,groupcomponent from win32_groupuser")
for the first part, but how do I incorporate the equivalent of | % {[wmi]$_.partcomponent|select domain,name,SID}
Alteatively, how could I do
gwmi win32_groupuser | % { [wmi]$_.partcomponent }
using vbscript; as it is not a query, I caot use execquery, but it does the same thing
برچسب:
نویسنده: استخدام کار