Sunday, 26 March 2017

Add Users to a Group–PowerShell Script

You can use the following Power Shell script to Add a User to Group.

# Authr: Gowtham Rajamanickam
# Title:Add User to a Group - PowerShell Script
#Version:: 1.0
Import-module ActiveDirectory  
Import-CSV "C:\Scripts\Users.csv" | % {  
Add-ADGroupMember -Identity AGNEWGROUP -Member $_.UserName  

No comments:

Post a Comment

Create Sites, Lists and Libraries in SharePoint 2016