Mark Minasi's Tech Forum
Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
charlesnm

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 43
Reply with quote  #1 

Is it possible to run a script to verify who has local admin rights to PC in our domain?


Regards,

Charles 

0
jsclmedave

Administrator
Registered:
Posts: 463
Reply with quote  #2 
Yes there are several examples online;  I have a couple that I use as well.

What have you tried so far?

__________________
Tim Bolton @jsclmedave
Email: [string](0..20|%{[char][int](32+('527377347976847978324785847679797514357977').substring(($_*2),2))}) -replace ' '  

New to the forum? Please Read this
0
charlesnm

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 43
Reply with quote  #3 
Unfortunately I have not tried any so far.   Can you please recommend one?  If possible to export to a .cvs file.



Regards,

Charles  
0
charlesnm

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 43
Reply with quote  #4 
I was able to locate a script.   Would I need to enable PowerShell Remoting in my Domain?



Charles
0
cj_berlin

Avatar / Picture

Senior Member
Registered:
Posts: 300
Reply with quote  #5 
Quote:
Originally Posted by charlesnm
I was able to locate a script.   Would I need to enable PowerShell Remoting in my Domain?

It depends. I would expect such a script to be using WMI in order to support older OSes as well. For that, you don't need PS remoting. If your script does use remoting, you obviously need to enable that ;-)

It would help us answer your question if you posted the script (please use code formatting if you do!) or a link to where you got it from.

__________________
Evgenij Smirnov

My personal blog (German): http://www.it-pro-berlin.de/
My stuff on PSGallery: https://www.powershellgallery.com/profiles/it-pro-berlin.de/
0
charlesnm

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 43
Reply with quote  #6 
This is the script I was trying to run

import-csv T:\computers.csv | Get-LocalGroupMembership | Where Name | Export-CSV t:\LocalAdmins.csv

Frist error was Get-LocalGroupMembership  : The term 'Get-LocalGroupMebership'

0
wobble_wobble

Avatar / Picture

Associate Troublemaker Apprentice
Registered:
Posts: 896
Reply with quote  #7 
This is a VBS script I use.

Run it from a machine with domain credentials.
Use task manager or Sysmon Process Monitor to see it working as it works quietly.

I generally schedule it to run once a week for 6 weeks to capture all the computers.
Its shared from here as a doc so save it as a vbs file Doc


__________________
Have you tried turning it off and walking away? The next person can fix it!

New to the forum? Read this
1
charlesnm

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 43
Reply with quote  #8 
Thank you,
  let me see what I can do we this.



Charles
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.