
=========Run Daily Report Script
.\Get-ExchangeEnvironmentReport.ps1 -HTMLReport .\AECUK-Report.html

----------------------------------------------------

==========Get All Stopped Services with name MS*
Get-service -ComputerName bhm1uc01 -Name ms* | Where-Object {$_.status -eq "stopped"} 

Get-service -ComputerName AEC01A-EX02 -Name ms* | Where-Object {$_.status -eq "stopped"}

----------------------------------------------------


========Set-ExecutionPolicy
Set-ExecutionPolicy unrestricted

----------------------------------------------------


======Enable Mailbox

Enable-Mailbox john@contoso.com -Database "MyServer\Mailbox Database"

E.g Enable-Mailbox john@contoso.com -Database "MyServer\Mailbox Database"

----------------------------------------------------



============MailEnableContactInOU
 
get-contact -organizationalunit testou -RecipientTypeDetails Contact -Filter 'WindowsEmailAddress -ne $null' | 
 foreach { enable-mailcontact -Identity $_ -ExternalEmailAddress $_.WindowsEmailAddress.toString() }
 
-----------------------------------------------------

-----------------------------------------------------
Run Program As Admin (E.g adm_alb100)
-----------------------------------------------------

runas /user:AECUK\adm_alb100 /savecred %windir%\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe