Powershell: How to get started.
Part 2 to this article is located here
Below is compiled to help get helpdesk, system admins/ engineers, and security personnel started on a set path to not just learn powershell but to maintain that knowledge and it is all free.
- Getting Started with PowerShell 3.0 Jump Start: http://www.microsoftvirtualacademy.com/training-courses/getting-started-with-powershell-3-0-jump-start
- Advanced Tools & Scripting with PowerShell 3.0 Jump Start: http://www.microsoftvirtualacademy.com/training-courses/advanced-tools-scripting-with-powershell-3-0-jump-start
- Videos and Podcasts: http://technet.microsoft.com/en-us/scriptcenter/ff645400.aspx
- Microsoft Virtual Labs (Search for powershell): http://technet.microsoft.com/en-us/virtuallabs/bb467605.aspx
- Windows PowerShell Self-Study Guide: http://blogs.technet.com/b/musings_of_a_technical_tam/archive/2012/06/04/windows-powershell-self-training-guide.aspx
For a list of references you can always use:
- http://social.technet.microsoft.com/wiki/contents/articles/4307.powershell-for-beginners.aspx
- http://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx
- http://technet.microsoft.com/en-us/library/hh848794.aspx
- http://technet.microsoft.com/en-us/library/ee617195.aspx
- http://technet.microsoft.com/en-us/library/ee461027.aspx
For a quick cheat sheet you can use/ build off of:
"Import-Module ActiveDirectory" from powershell.
if they want to see what modules are installed on the box, they can run "Get-Module -list".
Get-aduser ``"username"
-properties *
Get-Adcomputer ``"Computername"
-properties *
Unlock-ADAccount –identity “Username”
The following command is still required by a privileged account or higher.
"Import-Module GroupPolicy"
from powershell.
Get-GPO -name ``"Group Policy Name"
Get-GPPermissions –Name “GPO Name” –``all
Get-GPInheritance -target ``"ou=MyOU,dc=contoso,dc=com"
Get-gpresultantsetofpolicy -reporttype html -path c:\gpreport
Get-EventLog -list
get-eventlog system | where-object {$_.entrytype -eq ``"error"``}
#Or
get-eventlog system -newest ``100
| where-object {$_.entrytype -eq ``"error"``}
#Or
get-eventlog system -newest ``100
| where-object {$_.entrytype -eq ``"error"``} | format-list
Note: the word "system" is in reference to the log you are reading from, you can choose any log you want and pipe it to a .txt file if you wish.