gsx webinar powershell cmdlets automation
Post on 19-Oct-2014
737 views
DESCRIPTION
Using PowerShell scripting to monitor an Exchange environment can be a daunting task for Exchange administrators when they do not know how to automate the main cmdlets. Follow this link to access the podcast (full video and audio of the presentation): http://www.gsx.com/GSX-Podcast-Webinar-PowerShell-Cmdlets-Automation/TRANSCRIPT
Jean-Francois Piot
VP Product Management at GSX Solutions
Olivier Raynaut
Microsoft Specialist at GSX Solutions
2 GSX Solutions© 2012
3
GSX Solutions at a glance
Created in 1996
Headquarter in Switzerland
Offices in the USA, UK and France
Specialized in Messaging and Collaboration
Environment supervision
4
Introduction
Starting with PowerShell: Must Have Knowledge
How to use PowerShell?
Get Information and configure your environment with
PowerShell
Monitor and troubleshoot your environment
Report on usage of your environment
Problem with the use of PowerShell
How GSX Monitor and Analyzer can help you ?
5 GSX Solutions© 2012
Designed as a new approach to command line
management, released in 2006
Built upon the .Net framework
Use cmdlets for management, queries and tasks
Able to combine cmdlets to perform more complex tasks
Able to ‘Pipe’ output from one cmdlet to the input of
another
Can be used to manage servers and applications remotely
6 GSX Solutions© 2012
Pre-installed on Windows 7 and Windows Server 2008 R2
but can be added to previous versions by downloading
and installing the Windows Management Framework
Snappin
Cmdlet to find his way:
Syntax: “verb-resource”
New
Get
Remove
Set
7 GSX Solutions© 2012
Cmdlet:
There are only two cmdlets you need to know:
– Get-Help
– Get-Command
For all the common cmdlets there are aliases that allow you to call them:
– Get-Help
• man
• help
• Get-Command • gcm
Advice: Parameters for Get-Help:
- full: full help
- online: TechNet article on the cmdlets.
8 GSX Solutions© 2012
Two Ways:
Exchange Management Shell
Easiest way to start with
Launch : « Exchange Management Shell »
Remote PowerShell
Creating a PSSession: $session = New-PSSession –computerName
<fqdn of machine> -credential Get-Credential –authentication
Kerberos
Connecting to Exchange directly: $session = New-PSSession -
credential Get-Credential –authentication Kerberos –connectionURI
http://<FQDN of Exc server>/PowerShell –configurationName
Microsoft.Exchange
9 GSX Solutions© 2012
First actions:
Import the session:
Import-PSSession $session
Enter the session
Enter-PSSession $session
Invoke commands on the remote computer
Invoke-Command { any cmdlet here} –session $session
10 GSX Solutions© 2012
Get Exchange Server
Retrieve all the server of the current organization with name, site, roles,
version, AD server, etc.
Get Mailbox
Retrieve attributes and object for a mailbox
Get ActiveSyncDevice
Retrieve the list of devices with identification, configurations, status
information
Get PublicFolderDatabase
Return specific database properties (including backup and mount status
information)
Get MailboxDatabase
Retrieve one or more Mailbox Database objects
11 GSX Solutions© 2012
Autodiscover Test
Test-OutlookWebservices
Mailbox Servers
Get-MailboxDatabaseCopyStatus
Test-MapiConnectivity
Hub Transport
Get-Queue
Client Access Servers
Test-OwaConnectivity
Test-PopConnectivity
Test-ImapConnectivity
Test-ActiveSyncConnectivity
12 GSX Solutions© 2012
Test OWAConnectivity
Definition
Test All Microsoft Exchange virtual directories
Real Test
Test ActiveSync Connectivity
Definition
Makes a real synchronization and a Direct Push test
Real Test
13 GSX Solutions© 2012
Get-Mailbox
Definition: retrieve attributes and objects for mailbox
Test
Get-MailboxStatistics
Definition: Obtain information about mailbox (size, number of
messages, last time accessed, etc…)
Test
Get-LogonStatistics
Definition: Retrieve logon information about current active sessions
Test
14 GSX Solutions© 2012
Maintainability
Automate and alert
Store the information
Trend availability and usage statistics
15 GSX Solutions© 2012
Maintainability
Automate and alert
Store the information
Trend availability and usage statistics
16 GSX Solutions© 2012
17 GSX Solutions© 2012
Scanning engine: where to automate tests?
Alert system: how to be alerted?
Mailbox, CAS, Hub, CAS Array, DAG PowerShell tests
PowerShell autodiscovery of the environment
End-to-End tests
Storing Statistics
Trending PowerShell statistics
18 GSX Solutions© 2012
GSX automates the PowerShell tests
GSX automates the alert system
GSX calculates and reports on the availability on each role
Mailbox, CAS, Hub, CAS Array, DAG with PowerShell tests
GSX draws the PowerShell autodiscovery of the environment
GSX adds others End-to-End tests such as Mail Routing
GSX enables the storage of PowerShell statistics for
troubleshoot and trending capacity
19 GSX Solutions© 2012
GSX Solutions
North America
Buffalo, USA
+1 310 765 4139
GSX Solutions
Headquarters
Geneva, Switzerland
+41 22 735 82 40
@GSX_Solutions
Friend of GSX
GSX-Solutions Like page
Blog www.gsx.com/blog