Does anyone know a way to query members of a local admin group using WMIC (on a remote server)? I know this is possible thanks to powershell and vbs, but I'm really looking for a command line option (called from an internal PHP site).
I tried the following
wmic /Node:"ComputerName" path win32_groupuser where (groupcomponent="win32_group.name=\"administrators\",domain=\"Domain\"")
but could not get it to work.
source
share