I’m in a youth cyber security competition known as Cyber Patriot, and within the program I’m my teams captain this year. One of the biggest roles as team Captain is making Scripts and Checklists for my team. I have made the biggest powershell script in my teams history, but I’ve been struggling with debugging it.i am down to one command, that has stumped my entire team. This is a command that I wrote myself (we don’t talk about how long it took) however when I went to test it within the script on one of our training VMs I learned that in our windows VMs we will complete with for points, Active Directory isn’t installed. So what i would like help with is how do I either convert this to not use active directory or find a new command that does the same thing without Active Directory. Remember, your helping today’s youth, but tomorrows leaders.
Here’s the command:
Replace 'OU=Sales,DC=domain,DC=com' with your OU path
Get-ADUser -Filter * -SearchBase "OU=Sales,DC=domain,DC=com" |
Set-ADUser -ChangePasswordAtLogon $true
(Ik the pipe isn’t correct the way it pasted in)
Please ping me if you have any fixes/questions/suggestions.