Question: Provide a powershell script that will ask for the user's name in Active Directory and will remove a group that is in their AD. An

Provide a powershell script that will ask for the user's name in Active Directory and will remove a group that is in their AD. An example would be "Please enter your username" (you then enter a username from a user in AD and it would remove a group they were assigned to like Test_Contractors AD Group)


Step by Step Solution

3.37 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Prompt user for their username Username ReadHost Please enter your username Search for the user in Active Directory User GetADUser Filter SamAccountNa... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!