Professional Documents
Culture Documents
20417a 03 PDF
20417a 03 PDF
Module 6: Implementing Direct Access Module 12: Implementing Active Directory Federation Services
Module Overview
Overview of Windows PowerShell 3.0 Using PowerShell 3.0 to Manage AD DS Managing Servers by Using PowerShell 3.0
console Actions can be invoked within GUIs by running PowerShell commands in the background
Verb
Get Set
Noun
EventLog ExecutionPolicy
Cmdlet
Get-EventLog Set-ExecutionPolicy
New
VM
New-VM
Cmdlet Aliases
You can use aliases for:
Backward compatibility Shorten scripts Easier discoverability
Common Aliases: cd -> Set-Location dir -> Get-Child-Item ls -> Get-Child-Item copy -> Copy-Item kill -> Stop-Process rm -> Remove-Item type -> Get-Content help -> Get-Help
Other cmdlets that you can use for accessing help: Update-
command:
Get-Module
Modules can be of the following types:
Script Binary
to a remote computer Run one or more commands on that computer Bring those results back to your computer
The goals of Windows PowerShell remoting are:
Single-seat
Run Command
PowerShell remoting are: Local 1-to-1 Remoting 1-to-Many (or Fan-Out) Remoting Many-to-1 (or Fan-In) Remoting
Remote
value, object, or collection of objects Variables are named, and their names are preceded with a dollar sign
$ADDS
Get-ADDomain
of another cmdlet
Process Object
Pipe
| Enable-ADAccount
Format-Wide (FW)
Format-Table (FT)
Format-List (FL)
Format-Custom (FC)
Measure-Object (measure)
Sort-Object (sort)
Select-Object (select)
Where-Object (where)
include: Restricted AllSigned RemoteSigned Unrestricted Bypass Scripts are text files with a .ps1 extension Scripts contain one or more commands that you want the shell to execute in order Scripts, when run, require a relative or full path to be specified: .\Get-LatestLogon.ps1 E:\Mod03\Democode\Get-LatestLogon.ps1
Windows PowerShell
accounts, groups, and organizational units Provides a Windows PowerShell history of all commands used Is a Windows PowerShell learning tool
Target 1
Target 2 .
Target n
Scheduled Jobs: Registered background jobs that can run on a schedule Triggers are created to define schedule
activities Enables automating multiple server management and application provisioning Enables processes to be resumed, paused, and restarted Created by using Windows PowerShell or Visual Studio Workflow Designer
Windows Server 2012 includes over 60 predefined
workflows
Quick Review
What happens if you try to run an unsigned script
that you have created locally and the execution policy is set to RemoteSigned? When a user that is not authorized attempts to logon to Windows PowerShell Web Access, what occurs?