malkaj01
asked on
SCCM Local Admin Users
Hi All!
I'd like to know if there's any way to collect the information on the users who are members of the local Administrators group though SCCM.
Any ideas?
Many thanks.
Cheers!
I'd like to know if there's any way to collect the information on the users who are members of the local Administrators group though SCCM.
Any ideas?
Many thanks.
Cheers!
I think that you can collect information for users who are member of domain groups only.
Here's a VBScript file I pushed to all workstations. If a user has admin rights, it writes out a text file in the format of computername.username.txt to whatever share you specify.
' Variables
Dim objFileSystem, objOutputFile
Dim strOutputFile
' Init objects
Set Shell = CreateObject("WScript.Shell")
Set oNet= WScript.CreateObject("WScript.Network")
Set filesys = CreateObject("Scripting.FileSystemObject")
' Grab computername
computername = Shell.ExpandEnvironmentStrings("%computername%")
' See if we can do something "Admin" like
if filesys.FolderExists("\\" & computername & "\Admin$\System32") then
' Grab username
oUser = oNet.UserName
' Set filename to computername.username.txt
strOutputFile="\\wksms01\logs\" & computername & "." & oUser & ".txt"
Set objOutputFile = filesys.CreateTextFile(strOutputFile, TRUE)
'Close file
objOutputFile.Close
Set objFileSystem = Nothing
end if
ASKER
aleinss: Thanks for the script but I was interested in knowing if I could do this though the SCCM console without having to push out any scripts.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.