PowerShell tools for Exchange Administration · PowerShell tools for Exchange Administration. A bit...
Transcript of PowerShell tools for Exchange Administration · PowerShell tools for Exchange Administration. A bit...
Conference 2018
MarioIvanovDataCentreServices,UniversityofVictoria
PowerShelltoolsforExchangeAdministration
Abitaboutmyself
EXCHANGETOOLSTOSET/RESET:
• Mailboxpermissions• Calendarpermissions• SendAspermissions• SendonBehalfpermissions• UnifiedVoicemessaging• Outofofficemessage
WhatisPowerShell?Built on the .NET Framework, PowerShell is a task-based command-line shell and scriptinglanguage; it is designed specifically for system administrators and power-users, to rapidlyautomate the administration of multiple operating systems (Linux, MacOS, Unix, andWindows) and the processes related to the applications that run on those operatingsystems.
Windows PowerShell introduces the concept of a cmdlet (pronounced "command-let"), asimple, single-function command-line tool built into the shell. You can use each cmdletseparately, but their power is realized when you use these simple tools in combination toperform complex tasks. Windows PowerShell includes more than one hundred basic corecmdlets, and you can write your own cmdlets and share them with other users.
Warning:PowerShellispowerful!
• Beginnersshouldalwaysstartwithnon-intrusivecommandletsi.e.startingwith“Get-”
• The“dangerous”onesstartwith“Set-”,“Remove-”etc.
Example
Get-Mailbox - returnsahugeamountofpropertiesbelongingtoanExchangemailbox,literallyabove200.Amongthem:
• Displayname• Databasename• Forwardingaddress,• Iftheyhaveapicture• IfhiddenintheGlobalAddressList
LoggingtotheExchangeserver
Consoleversions
SwitchingtoGUI• WindowsFormsa.k.a.WinformsWinFormsisagraphical(GUI)classlibraryincludedasapartofMicrosoft.NETFramework,providingaplatformtowriterichclientapplicationsfordesktop,laptop,andtabletPCs.BeingafirstgenerationGUIbuildingtechnology,WinFormsUIlayoutisverysimplisticandlimited.Controlsareplacedusingdistancefromthetop-leftpointofawindowandtheirsizeisexplicitlyspecified.Thesizeofcontrolscan'tcompensateautomaticallywhenresizingwindows…etc.(FromWikipedia)
• WPF
Mailboxpermissionstool
Mailboxpermissionstool
a
Frequentrequest:Pleasegrantuser1FullAccessandSend-As permissiononthefollowingmailboxes:Mailbox1Mailbox2Mailbox3Mailbox4Mailbox5Mailbox6andremoveuser2havinganyaccessontheabove.
Calendar permissions tool
Set-MailboxFolderPermission -Identity dsstesting107:\calendar -User wclarke -AccessRights Editor
Existing permission is a requirement
Add-MailboxFolderPermission -Identity dsstesting107:\calendar -User wclarke -AccessRights Editor
No Existing permission is a requirement
Unified voice messaging tool
Typicalrequestexample:
Pleasemakeext.8631toforwardtomailboxjpotton
Get-UMMailbox -ResultSize Unlimited | where {$_.Extensions -like $phone}
Get-UMMailbox -ResultSize Unlimited | where { if($_.Extensions –like $phone){$line=$_;break}}
$dummyArr=@(1)foreach ($dummyelement in $dummyArr) {
get-ummailbox -ResultSize Unlimited |where { if($_.Extensions -like $phone){$line=$_;break} }}
Set out of office message tool
<html><body>…..<br>…..<br>…..<br>…..
</body></html>
SUMMARY
Thank you!
Thank you!
The presentation can be downloaded from here
http://web.uvic.ca/~mivanov/BCNET/