Jump to content

Recommended Posts

Posted

Hi everyone,

I have an easy problem: I need to schedule a task for the group "Users". This works nicely on English PCs, but on German and French it doesn't since the users group isn't called users there. Using the SID also doesn't work since the scheduler doesn't allow SID use in the CMD...

Long story short: This doesn't seem to work:

$objWMIService = ObjGet ("winmgmts:\\" & @ComputerName & "\root\cimv2")
$UserGroup = $objWMIService.ExecQuery ("Select Name from Win32_Group Where SID = 'S-1-5-32-545'")
MsgBox(0,"",$UserGroup)

I just get an empty popup instead of, like I hoped, the name of the users group.

Any idea how I can make this work easy?

Thank you very much for your time :)

Kind Regards

Christian

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...