Book now with code EOY2025
Do you have a recommended authors/vlogs/training site, etc?
I bought ‘Learn PowerShell in a Month of Lunches’ but it didn't help me as much as I hoped. What really helped me was reading/looking at other scripts and trying to break down what the script is trying to do. Then I found easy things that took too much time and wrote PS scripts in PowerShell ISE. I would recommend using PowerShell ISE as it does have an auto-fill that will show you plausible options as you begin to type. As I learned more, I would go back and alter the scripts to add in new things I thought of or learned.
Example: Googled how to get list of groups a user is in... [Get-ADPrincipalGroupMembership -Identity 'User']
Wait a second… It works in AD server but not at my desk. Hmm… Google tells me that I need to install the Active Directory module in order for it to work on my computer. Follow steps and run again…
Success! However I’m not liking the way the data is displayed back to me… Too much scrolling…
Oh! There’s a way to format the information… [Get-ADPrincipalGroupMembership -Identity 'User' | FT]
Now how do I move a user into a different OU...? [Get-ADUser ‘User’ | Move-ADObject –TargetPath ‘OU=”OU Name”,DC=Fake,DC=com’]
So I can disable a user account… [Disable-ADAccount –Identity ‘User’]
Add the above together and I have the beginning of what I use for my employee termination script…
Now instead of changing the User multiple times in each section prior to running, I learned about variables and added $User to my script.
From there I learned how to use Visual Basic to create an InputBox that would open up and I can just now type the user’s name in the box instead of editing the script every single time.
And so forth…
Use code EOY2025 to receive $250 off your 2025 certification boot camp!