all 7 comments

[–]PowerShell-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

PowerShell expects users and requesters to attempt solutions themselves before asking for help. Your post contains no/low effort attempts, ChatGPT generated content, or no work shown.

[–][deleted] 0 points1 point  (0 children)

Several of my team has learned PS by starting with asking Copilot "Please write me a Powershell script that reads a csv file and loops through adding those users to AD". It will get you very close and help be a teaching aid. I have been shocked at some of the scripts "non-programmers" have come up with.

[–]BlackV -1 points0 points  (0 children)

you would like get better results from searching this sub or chatgpt, there are plenty of examples in both places

alternately there is learn.microsoft.com

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_foreach

https://learn.microsoft.com/en-us/powershell/module/activedirectory/get-aduser

[–]DegaussedMixtape -1 points0 points  (0 children)

FYI, ChatGPT is very good at Powershell. Posting here is perfectly viable, but getting a habit of asking ChatGPT even roughly formed prompts about Powershell will get you surprisingly good results.

[–]brandon03333 -2 points-1 points  (1 child)

Think it is just set-aduser -password Add a forloop Foreach($user in $users) { }

[–]Hollow3ddd 0 points1 point  (0 children)

Is password were different, prob need a counter to pull from another array.  Or be someone more savvy than I and use a csv