Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Automating user management

$
0
0

I need to automate the following task:

I receive regularly a SAMName list of groups which varies between 10 to 30.

I want to check if each group exists in the main domain, if it exists I need to check the group’s scope, if it is local I have to search it in another domain and add the user to both of them and if it does not exist I need to add it to create a list of non existing groups.

I use Windows XP with admin pack (dsadd, dsquery, dsget…)

with command line I can for example use : dsquery group –d maindomain.local –samid group_name

If it exists I get the groups’ UPN name and if it does not exist I get a blank ligne.

My question is should I learn Vbscript or PowerShell to automate the task?


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>