Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft ® shell scripting environment Gives administrators more power and command in the shell environment – Hence…PowerShell? Active Directory Module.

Similar presentations


Presentation on theme: "Microsoft ® shell scripting environment Gives administrators more power and command in the shell environment – Hence…PowerShell? Active Directory Module."— Presentation transcript:

1

2 Microsoft ® shell scripting environment Gives administrators more power and command in the shell environment – Hence…PowerShell? Active Directory Module for Windows® Powershell allows for command-line and scripted operations

3 Getting Help Get-help

4 Getting Help Get-help get-acl -examples

5 Local Command Get-ACL c:\windows

6 Local commands Get-Service—returns all services running on host

7 Local commands Get-Service > services.txt—output of Get-Service redirected to file services.txt

8 Local commands Get-Service | ConvertTo-HTML | Out-File services.html—output of Get-Service piped to ConvertTo-HTML whose output is piped to Out- File services.html

9 Local commands Get-Service | ConvertTo-HTML | Out-File services.html

10 Local commands Get-Service | Select Name,Status | ConvertTo- HTML | Out-File services.html

11 Check the state/status of a service – Get-WmiObject –class Win32_Service –filter ‘name=”adws”

12 View Event log errors – Get-EventLog -LogName 'Application' -EntryType Error -Newest 5 | Select-Object -property eventid, message | Format-table -AutoSize - Wrap

13 Determine SID of local user accounts Returns the security identifier of the diplayed name. – $objUser = New-Object System.Security.Principal.NTAccount("administrator") – $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) – $strSID.Value

14 Determine SID of domain user accounts Returns the security identifier of the displayed name. – $objUser = New-Object System.Security.Principal.NTAccount(“domain name”, "administrator") – $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) – $strSID.Value

15 Saving PowerShell scripts Save commands at *.ps1

16 Must change script execution policy to run scripts. Options are: – Restricted—no scripts can be run (default). – AllSigned—only scripts signed by trusted publisher can be run – RemoteSigned—downloaded scripts must be signed by a trusted publisher – Unrestricted—no restrictions  Thunderdome!

17 Get-ExecutionPolicy—displays current policy Set-ExecutionPolicy—change policy

18 Growing resources daily

19 More Resources  http://technet.microsoft.com/en-us/library/bb978526.aspx http://technet.microsoft.com/en- us/scriptcenter/powershell.aspx http://technet.microsoft.com/en- us/scriptcenter/powershell.aspx http://gallery.technet.microsoft.com/ScriptCenter/en-us/ http://technet.microsoft.com/en- us/library/dd378937(WS.10).aspx http://technet.microsoft.com/en- us/library/dd378937(WS.10).aspx Questions…..


Download ppt "Microsoft ® shell scripting environment Gives administrators more power and command in the shell environment – Hence…PowerShell? Active Directory Module."

Similar presentations


Ads by Google