IT Support | PowerShell - that non-GUI thing
Posted by David Quiram on Tue, Jan 10, 2012

PowerShell is the tool that most of us don't use to its full potential. I know we have our excuses, the biggest one being "it will take me longer to figure out how to do (insert task) through PowerShell. I can just use the GUI and figure it out next time", so when is the next time?
Why use PowerShell? Oh my, there are many reasons.. Through PowerShell you can do anything that the GUI can do for the task you're completing and more...really more. You can create the commands and save them for use again...it’s like (gasp) scripting!
I find it most useful when trying to pull data out of Active Directory for reporting and for creating large number of users at the same time.
What are some of the things that one can do with cmdlets in with users in Active Directory?
-
Create user accounts
-
Manage user accounts
-
Change user accounts properties
-
Reporting on user accounts
-
Determine a user’s last log in time or those who have not logged in recently
-
Finding users who’s accounts are about to expire
-
Computer management
-
Join a computer to a domain
-
Rename computers
-
Finding computers of a particular OS
-
Group Management
-
Reporting on groups
-
Finding users and groups
-
Manage Service Accounts
-
Forest Management
-
Domain Management
-
Manage Password Policies
Oh and all these can be done remotely too!!! I read about one administrator who used PowerShell to scan a directory for a .csv nightly. The HR staff would drop in a .csv of the new users and they would be created at night automatically through the use of PowerShell. Get work done and sleep!!!
But where are all the commands to enter in to do all this? That, you will have to find for yourself, odds are you used a search engine to get to this point, take it a few steps further. All the commands and things you want to do have probably been done by someone else. Just make sure you find several versions of the commands you want to run and compare them. Don't be a script kiddy and just run the first one that you find. If you don't understand what you’re running, that is a huge risk. Risk is bad.
