Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Exchange 2010 PowerShell and the Exchange 2003 Administrator

1,875 views

Published on

Presented on 19 May 2011

By Michel de Rooij
http://www.eightwone.com

and Maarten Piederiet
www.conclusion.nl/

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Exchange 2010 PowerShell and the Exchange 2003 Administrator

  1. 1. Exchange 2010 PowerShell <br />and the<br />Exchange 2003 Administrator<br />Michel de Rooij | Dimension Data<br />Maarten Piederiet | Conclusion FIT<br />
  2. 2. Agenda<br />Introductie PowerShell<br />Wat, waarom, hoe, ..<br />PowerShell & Exchange<br />Demo<br />Tips & Tricks<br />Vragen<br />
  3. 3. Wiegebruiktmomenteel ..<br />Batchfiles?<br /><ul><li>Windows Scripting Host (J/VBScript)?</li></ul>Kixtart<br />PowerShell<br />Overigen?<br />bash/ksh/perl/..<br />
  4. 4. Wat?<br />Interactieve command-line shell<br />Scripting (interpreter)<br />Platform voor Windows/Server beheer<br />ITPro’szijngeendevelopers<br />
  5. 5. Waarom?<br />Management OS onderdelen<br />Active Directory, Clustering, IIS<br />Out-of-the-box connectiviteitnaar interfaces<br />WMI, ADSI, .NET, COM<br />GUI’s gebouwdbovenopPowerShell<br />Produktondersteuning<br />Exchange, Lync, Hyper-V R2, SQL Server 2008 R2, ..<br />Common Engineering Criteriahttp://www.microsoft.com/cec/<br />
  6. 6. Historie<br />2003: (Codename) Monad<br />2006: PowerShell v1.0<br />Optioneel: Windows Server 2003/2008, XP SP2/3, Vista<br /><ul><li>2009: PowerShell v2.0</li></ul>Geïntegreerd: w2008 R2, w7<br />Beschikbaar: 2008 SP2, XP SP3, w2003 SP2, Vista SP1 (WMF)<br />Extra features (X cmdlets)<br />Remoting, Modules<br />
  7. 7. Tools<br />Console/Shell<br />Powershell.exe<br />Integrated Scripting Editor (PS2)<br />Powershell_ise.exe<br />3rd Party Editors<br />PowerGUI<br />
  8. 8. Object<br />Objectenhebben ..<br />Methods (functies)- Start, Stop, Refresh ..<br />Properties (attributen) - Name, Status, ..<br />$obj= Get-Service wuauserv<br />$obj.Start()<br />$obj.Status<br />
  9. 9. Variabelen<br />Beginnen met $<br />Bevat(ten) object(en)<br />Speciale variable: $_<br />$_ bevat huidige object in pipeline<br />
  10. 10. Cmdlets<br />Cmdlets ..<br />werken op objecten, niettekst<br /><Verb>-<Noun><br />Parameters ..<br />Specificeren of sturenopdracht<br />Vereist of optioneel<br />Positioneel of niet<br />Is van bepaald Type (String, Integer, ..)<br /><Naam>(:)<Waarde><br />
  11. 11. Voorbeeld: Cmdlet<br />Positioneel:<br />ParameterNaam<br />Parameter Waarde<br />Cmdlet<br />winlogon<br />-name<br />Get-Process<br />String<br />-Name<br />Verb-Noun<br />winlogon<br />Get-Process<br />
  12. 12. Pipeline<br />Cmdlets werken met pipeline<br />Output cmdlet A = input cmdlet B<br />Pipeline eindigt in speciaal cmdlet<br />Out-Default<br />Zet output om in tekst<br />Opmaak in lijst of tabel<br />Filteren & ordenen objecten<br />Sort-Object, Where-Object, ..<br />Get-Mailbox | Where { $_.Database –eq “mdb01”}<br />
  13. 13. Voorbeeld: Pipeline<br />cmdlet | cmdlet<br />Cmdlet<br />Cmdlet<br />object<br />object<br />object<br />object<br />object<br />
  14. 14. Ontdek PowerShell<br />Get-Help (help)<br />Help functie<br />Get-Command (gcm)<br />Welke beschikbare opdrachten?<br />Get-Member (gm)<br />Welke methodes & properties?<br />Voorbeelden<br />Get-Help Get-Mailbox -Full<br />Get-Command –noun Mailbox<br />Get-Command –CommandType cmdlet<br />Get-Mailbox MelleG | Get-Member<br />help about*<br />
  15. 15. Exchange & PowerShell<br />On-Premise<br />Exchange Management Shell<br />Exchange 2007: PowerShell v1.0<br />Exchange 2010: PowerShell v2.0<br />Exchange Online / Office 365<br />Exchange Management Shell<br />PowerShell v2.0<br />
  16. 16. Demo Time!<br />
  17. 17. Handig<br />Tab Completion<br />Aliassen<br />dir, cd, type, c:, where, ..<br />Get-Alias<br />PowerShell Drives<br />File System, Registry, Environment, AD, IIS, ..<br />Get-PSDrive<br />Where-Object (?)<br />For-Each (%)<br /><ul><li>Profile (≈ *nix .profile)</li></ul>-WhatIf:$True<br />Out-GridView<br />
  18. 18. Handig (2)<br /># Wat zijn de rechten op bepaalde mailbox?<br />Get-Mailbox $TestMailbox | Get-MailboxPermission | ? { !$_.IsInherited } | ft User,AccessRights<br /># Wat is de top 10 van grootste mailboxen<br />Get-Mailbox | Get-MailboxStatistics | Sort TotalItemSize -desc | Select -First 10 | ft DisplayName,TotalItemSize<br /># Rapporteer niet-lege queues<br />Get-TransportServer | Get-Queue -filter {MessageCount -gt 0}<br /><ul><li># Office 365 PowerShell via remoting & prefixing</li></ul>$cred= Get-Credential<br />$o365= New-PsSession -ConfigurationNameMicrosoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -AllowRedirection -Authentication Basic<br />Import-PsSession$o365 –Prefix o365<br />Get-o365Mailbox<br />
  19. 19. Opletten<br />Set-Executionpolicy<br />Default = Restricted = Geen Scripts<br />Bypass, Unrestricted, RemoteSigned, ..<br />Get-Help about_Execution_Policies<br />“” en ‘’ (expansie variabelen)<br />, (array)<br />-ResultSize Unlimited (default 1000)<br />Credentials<br />$cred= Get-Credential<br />New-MoveRequest.. -RemoteCredential$cred<br /><ul><li>Remoting en Edge</li></li></ul><li>Links<br />PowerShell Online Documentation<br />http://technet.microsoft.com/en-us/library/bb978526.aspx<br />Script Center<br />http://technet.microsoft.com/en-us/scriptcenter/<br />Exchange Management Shell<br />http://technet.microsoft.com/en-us/library/bb123778.aspx<br />PowerShell Team Blog<br />http://blogs.msdn.com/b/powershell/<br />“Mastering PowerShell” (gratis e-book)<br />http://powershell.com/Mastering-PowerShell.pdf<br />PowerGUI<br />http://www.powergui.org/<br />
  20. 20. Vragen?<br />
  21. 21. Bedanktvooruwaandacht!<br />Michel de Rooij:<br />E-mail: michel.de.rooij@ngn.nl<br />Blog: http://eightwone.com<br />Twitter: @mderooij<br />Maarten Piederiet:<br />E-mail: maarten.piederiet@cfit.nl<br />Twitter: @MPiederiet<br />

×