/build/static/layout/Breadcrumb_cap_w.png
10/09/2018 351 views
From K1000, How can I Showing all PC's have local admin right and also changing the password of the local PC's all at once?
0 Comments   [ + ] Show comments

Comments



Community Chosen Answer

1
To show all systems with users which have local admin rights the easiest way is a Custom Inventory Rule.
For German and English this one is useable:
ShellCommandTextReturn(cmd /c net localgroup Administratoren) OR ShellCommandTextReturn(cmd /c net localgroup administrators)

You can report this after the next check in.

For the machines which have user and the user names you can run a net user  loginid  newpassword

Answered 10/09/2018 by: Nico_K
Red Belt

  • Thank you for your response. "ShellCommandTextReturn(cmd /c net localgroup administrators)" is showing all members in Administrator group But I want to show if the user who logging to the PC (joined to domain) was add to that group.

    For changing the local password, I'm still struggling. From Scripts ---> New-->Type (Online Kscript) -->New Task --> On Success (Launch a program)--> Directory ?? --> File ?? --> Parameters??

    Any help?
    • Directory: $(KACE_SYS_DIR)
      File: cmd.exe
      Params: net user loginid newpassword
      • you could also put the commands in a BAT file and upload it as a dependency to the script

All Answers

0
I use this report that notifies me every morning if meeting the following criteria:

SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=16239) AS MACHINE_CUSTOM_INVENTORY_0_16239  FROM MACHINE   WHERE ((( exists  (select 1 from MACHINE_CUSTOM_INVENTORY where MACHINE.ID = MACHINE_CUSTOM_INVENTORY.ID and MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID = 16239 and MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE like '%domain\\\\cn%')) ) OR (( exists  (select 1 from MACHINE_CUSTOM_INVENTORY where MACHINE.ID = MACHINE_CUSTOM_INVENTORY.ID and MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID = 16239 and MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE like '%damain\\\\co%')) ))  ORDER BY SYSTEM_NAME
The custom inventory rule I'm using is ShellCommandTextReturn(cmd.exe /c net localgroup Administrators)
Answered 10/09/2018 by: worzie
Third Degree Brown Belt