Exchange 2010 PowerShell and theExchange 2003 AdministratorMichel de Rooij | Dimension DataMaarten Piederiet | Conclusion FIT
AgendaIntroductie PowerShellWat, waarom, hoe, ..PowerShell & ExchangeDemoTips & TricksVragen
Wiegebruiktmomenteel ..Batchfiles?Windows Scripting Host (J/VBScript)?KixtartPowerShellOverigen?bash/ksh/perl/..
Wat?Interactieve command-line shellScripting (interpreter)Platform voor Windows/Server beheerITPro’szijngeendevelopers
Waarom?Management OS onderdelenActive Directory, Clustering, IISOut-of-the-box connectiviteitnaar interfacesWMI, ADSI, .NET, COMGUI’s gebouwdbovenopPowerShellProduktondersteuningExchange, Lync, Hyper-V R2, SQL Server 2008 R2, ..Common Engineering Criteriahttp://www.microsoft.com/cec/
Historie2003: (Codename) Monad2006: PowerShell v1.0Optioneel: Windows Server 2003/2008, XP SP2/3, Vista2009: PowerShell v2.0Geïntegreerd: w2008 R2, w7Beschikbaar: 2008 SP2, XP SP3, w2003 SP2, Vista SP1 (WMF)Extra features (X cmdlets)Remoting, Modules
ToolsConsole/ShellPowershell.exeIntegrated Scripting Editor (PS2)Powershell_ise.exe3rd Party EditorsPowerGUI
ObjectObjectenhebben ..Methods (functies)- Start, Stop, Refresh ..Properties (attributen) - Name, Status, ..$obj= Get-Service wuauserv$obj.Start()$obj.Status
VariabelenBeginnen met $Bevat(ten) object(en)Speciale variable: $_$_ bevat huidige object in pipeline
CmdletsCmdlets ..werken op objecten, niettekst<Verb>-<Noun>Parameters ..Specificeren of sturenopdrachtVereist of optioneelPositioneel of nietIs van bepaald Type (String, Integer, ..)<Naam>(:)<Waarde>
Voorbeeld: CmdletPositioneel:ParameterNaamParameter WaardeCmdletwinlogon-nameGet-ProcessString-NameVerb-NounwinlogonGet-Process
PipelineCmdlets werken met pipelineOutput cmdlet A = input cmdlet BPipeline eindigt in speciaal cmdletOut-DefaultZet output om in tekstOpmaak in lijst of tabelFilteren & ordenen objectenSort-Object, Where-Object, ..Get-Mailbox | Where { $_.Database –eq “mdb01”}
Voorbeeld: Pipelinecmdlet | cmdletCmdletCmdletobjectobjectobjectobjectobject
Ontdek PowerShellGet-Help (help)Help functieGet-Command (gcm)Welke beschikbare opdrachten?Get-Member (gm)Welke methodes & properties?VoorbeeldenGet-Help Get-Mailbox -FullGet-Command –noun MailboxGet-Command –CommandType cmdletGet-Mailbox MelleG | Get-Memberhelp about*
Exchange & PowerShellOn-PremiseExchange Management ShellExchange 2007: PowerShell v1.0Exchange 2010: PowerShell v2.0Exchange Online / Office 365Exchange Management ShellPowerShell v2.0
Demo Time!
HandigTab CompletionAliassendir, cd, type, c:, where, ..Get-AliasPowerShell DrivesFile System, Registry, Environment, AD, IIS, ..Get-PSDriveWhere-Object (?)For-Each (%)Profile (≈ *nix .profile)-WhatIf:$TrueOut-GridView
Handig (2)# Wat zijn de rechten op bepaalde mailbox?Get-Mailbox $TestMailbox | Get-MailboxPermission | ? { !$_.IsInherited } | ft User,AccessRights# Wat is de top 10 van grootste mailboxenGet-Mailbox | Get-MailboxStatistics | Sort TotalItemSize -desc | Select -First 10 | ft DisplayName,TotalItemSize# Rapporteer niet-lege queuesGet-TransportServer | Get-Queue -filter {MessageCount -gt 0}# Office 365 PowerShell via remoting & prefixing$cred= Get-Credential$o365= New-PsSession -ConfigurationNameMicrosoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -AllowRedirection -Authentication BasicImport-PsSession$o365 –Prefix o365Get-o365Mailbox
OplettenSet-ExecutionpolicyDefault = Restricted = Geen ScriptsBypass, Unrestricted, RemoteSigned, ..Get-Help about_Execution_Policies“” en ‘’ (expansie variabelen), (array)-ResultSize Unlimited (default 1000)Credentials$cred= Get-CredentialNew-MoveRequest.. -RemoteCredential$credRemoting en EdgeLinksPowerShell Online Documentationhttp://technet.microsoft.com/en-us/library/bb978526.aspxScript Centerhttp://technet.microsoft.com/en-us/scriptcenter/Exchange Management Shellhttp://technet.microsoft.com/en-us/library/bb123778.aspxPowerShell Team Bloghttp://blogs.msdn.com/b/powershell/“Mastering PowerShell” (gratis e-book)http://powershell.com/Mastering-PowerShell.pdfPowerGUIhttp://www.powergui.org/
Vragen?
Bedanktvooruwaandacht!Michel de Rooij:E-mail: 	michel.de.rooij@ngn.nlBlog:	http://eightwone.comTwitter:	@mderooijMaarten Piederiet:E-mail:	maarten.piederiet@cfit.nlTwitter:	@MPiederiet
Exchange 2010 PowerShell and the Exchange 2003 Administrator

Exchange 2010 PowerShell and the Exchange 2003 Administrator

  • 1.
    Exchange 2010 PowerShelland theExchange 2003 AdministratorMichel de Rooij | Dimension DataMaarten Piederiet | Conclusion FIT
  • 2.
    AgendaIntroductie PowerShellWat, waarom,hoe, ..PowerShell & ExchangeDemoTips & TricksVragen
  • 3.
    Wiegebruiktmomenteel ..Batchfiles?Windows ScriptingHost (J/VBScript)?KixtartPowerShellOverigen?bash/ksh/perl/..
  • 4.
    Wat?Interactieve command-line shellScripting(interpreter)Platform voor Windows/Server beheerITPro’szijngeendevelopers
  • 5.
    Waarom?Management OS onderdelenActiveDirectory, Clustering, IISOut-of-the-box connectiviteitnaar interfacesWMI, ADSI, .NET, COMGUI’s gebouwdbovenopPowerShellProduktondersteuningExchange, Lync, Hyper-V R2, SQL Server 2008 R2, ..Common Engineering Criteriahttp://www.microsoft.com/cec/
  • 6.
    Historie2003: (Codename) Monad2006:PowerShell v1.0Optioneel: Windows Server 2003/2008, XP SP2/3, Vista2009: PowerShell v2.0Geïntegreerd: w2008 R2, w7Beschikbaar: 2008 SP2, XP SP3, w2003 SP2, Vista SP1 (WMF)Extra features (X cmdlets)Remoting, Modules
  • 7.
    ToolsConsole/ShellPowershell.exeIntegrated Scripting Editor(PS2)Powershell_ise.exe3rd Party EditorsPowerGUI
  • 8.
    ObjectObjectenhebben ..Methods (functies)-Start, Stop, Refresh ..Properties (attributen) - Name, Status, ..$obj= Get-Service wuauserv$obj.Start()$obj.Status
  • 9.
    VariabelenBeginnen met $Bevat(ten)object(en)Speciale variable: $_$_ bevat huidige object in pipeline
  • 10.
    CmdletsCmdlets ..werken opobjecten, niettekst<Verb>-<Noun>Parameters ..Specificeren of sturenopdrachtVereist of optioneelPositioneel of nietIs van bepaald Type (String, Integer, ..)<Naam>(:)<Waarde>
  • 11.
  • 12.
    PipelineCmdlets werken metpipelineOutput cmdlet A = input cmdlet BPipeline eindigt in speciaal cmdletOut-DefaultZet output om in tekstOpmaak in lijst of tabelFilteren & ordenen objectenSort-Object, Where-Object, ..Get-Mailbox | Where { $_.Database –eq “mdb01”}
  • 13.
    Voorbeeld: Pipelinecmdlet |cmdletCmdletCmdletobjectobjectobjectobjectobject
  • 14.
    Ontdek PowerShellGet-Help (help)HelpfunctieGet-Command (gcm)Welke beschikbare opdrachten?Get-Member (gm)Welke methodes & properties?VoorbeeldenGet-Help Get-Mailbox -FullGet-Command –noun MailboxGet-Command –CommandType cmdletGet-Mailbox MelleG | Get-Memberhelp about*
  • 15.
    Exchange & PowerShellOn-PremiseExchangeManagement ShellExchange 2007: PowerShell v1.0Exchange 2010: PowerShell v2.0Exchange Online / Office 365Exchange Management ShellPowerShell v2.0
  • 16.
  • 17.
    HandigTab CompletionAliassendir, cd,type, c:, where, ..Get-AliasPowerShell DrivesFile System, Registry, Environment, AD, IIS, ..Get-PSDriveWhere-Object (?)For-Each (%)Profile (≈ *nix .profile)-WhatIf:$TrueOut-GridView
  • 18.
    Handig (2)# Watzijn de rechten op bepaalde mailbox?Get-Mailbox $TestMailbox | Get-MailboxPermission | ? { !$_.IsInherited } | ft User,AccessRights# Wat is de top 10 van grootste mailboxenGet-Mailbox | Get-MailboxStatistics | Sort TotalItemSize -desc | Select -First 10 | ft DisplayName,TotalItemSize# Rapporteer niet-lege queuesGet-TransportServer | Get-Queue -filter {MessageCount -gt 0}# Office 365 PowerShell via remoting & prefixing$cred= Get-Credential$o365= New-PsSession -ConfigurationNameMicrosoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -AllowRedirection -Authentication BasicImport-PsSession$o365 –Prefix o365Get-o365Mailbox
  • 19.
    OplettenSet-ExecutionpolicyDefault = Restricted= Geen ScriptsBypass, Unrestricted, RemoteSigned, ..Get-Help about_Execution_Policies“” en ‘’ (expansie variabelen), (array)-ResultSize Unlimited (default 1000)Credentials$cred= Get-CredentialNew-MoveRequest.. -RemoteCredential$credRemoting en EdgeLinksPowerShell Online Documentationhttp://technet.microsoft.com/en-us/library/bb978526.aspxScript Centerhttp://technet.microsoft.com/en-us/scriptcenter/Exchange Management Shellhttp://technet.microsoft.com/en-us/library/bb123778.aspxPowerShell Team Bloghttp://blogs.msdn.com/b/powershell/“Mastering PowerShell” (gratis e-book)http://powershell.com/Mastering-PowerShell.pdfPowerGUIhttp://www.powergui.org/
  • 20.
  • 21.
    Bedanktvooruwaandacht!Michel de Rooij:E-mail: michel.de.rooij@ngn.nlBlog: http://eightwone.comTwitter: @mderooijMaarten Piederiet:E-mail: maarten.piederiet@cfit.nlTwitter: @MPiederiet

Editor's Notes

  • #6 Common Engineering Criteria &gt; Scorecards – Jan’10
  • #9 Powershellondersteunt OO conceptenklassen, overerving en polymorphisme