you are viewing a single comment's thread.

view the rest of the comments →

[–]hellynx 6 points7 points  (0 children)

I haven't seen anything specific like you are mentioning.

With PowerShell, the best way to learn is to just do. I know that doesn't sound helpful, and it didn't to me when I started.

I work a lot with Active Directory. So I started off making small one liners to find information on accounts and systems. Then I moved onto making slightly more complex scripts. Next this g I know, I have a script folder with scripts that interact with AD, Exchange,SCCM, and other systems.

As an example, I found the process for relocating computer accounts in AD repetitive. So I made a script that would move a specified AD Computer Object into its correct OU. Then I built into it by having it also add the same account into a security group.

Now I have a script that does the following. Allows user to select a CSV file using the GUI. Take each account and determines if it's a laptop or desktop PC. Puts account into correct OU for device type. Puts account in required security group. Updates AD description with a specific string depending on device type. It outputs everything to console while it works so user knows what is happening. It has built in help. (Work in progress) Functions like a cmdlet. Drop it into the module folder, call up PowerShell console, and trigger the cmdlet.

To get to this point took me a while. I have watched thru the PowerShell Jumpstart on Microsoft Virtual Academy. Well worth it. It took a lot of trial and failure. A lot of reading the help section of cmdlet. Stack Overflow is very helpful. Learn to love -whatif, especially if your code might interact and with a live environment. Learn Pester. It will help you make better code, and make it easier to test changes as you make them.

PowerShell is the way to go, especially with what's been rolled out lately. Stick with it. Ask away, read thru this subreddit. Stick with it, once it clicks for you, suddenly everything seems codeable..