SharePoint, Microsoft’s highly effective collaboration and doc administration platform, provides a wealth of capabilities for organizations to streamline their enterprise processes.
At this time we are going to use SharePoint record along with PowerShell script to automate the method of including and eradicating person from AD group.
I’ll clarify the method and give you pattern script you could make the most of in your setting and automate lots of processes following the instance.
Step 1
Create a SharePoint record with beneath columns.
ADGroup
à AD Group Title
Motion
à ADD or REMOVE (select selection column for it)
Member
à UserPrincipalName of the Person
Standing
à Set it to InProgress for the script to work (Script will set it to finish after it provides or take away the person from the group. (Selection Area with Worth InProgress, Accomplished and Error)
erroremail à To obtain error if occurred throughout addition or elimination.
Create an entry within the record:
STEP 2
Schedule or RUN the PowerShell Script that may learn this request and course of it.
Stipulations for this Answer:
Obtain the script from Git.
SPOList2AD.ps1
https://github.com/VikasSukhija/Downloads
Replace the Script with beneath variables as per your setting:
After updating the SharePoint Web site record and different variables, run the script with the account that has rights to AD in addition to this SharePoint web site.
Script will auto generate encrypted password first time it’s run and reserve it in the identical folder.
Log might be generated and saved in logs folder.
Depend of adjustments is about to 500 to cease processing if requests are greater than 500, you’ll be able to set it as per your wants.
BatchSize is 5000 to take away the limitation of record view threshold of SharePoint.
Log Recycling is about to 60 days, you’ll be able to change it as per your wants.
After completion script will replace the standing to Full or Error in case error has occurred.
You possibly can construct PowerAPP or every other course of on the highest of it and automate it finish to finish.
I hope this pattern resolution will open numerous alternatives you could create and automate.
Thanks for studying …
Tech Wizard