May, 2019

[O365][PS] Exchange Online Powershell Module and connecting to Exchange Online

Example 1:

Example 2:

 Troubleshooting Errors: New-ExoPSSession : user_realm_discovery_failed: User realm discovery failed

Check proxy settings in IE New-ExoPSSession: The SSL certificate could not be checked for revocation.

Set winhttpbyusingsetproxycommand: Show: netsh winhttp show proxy Set Proxy: netsh winhttp set proxy <proxy url or ip>:<port> Reset Proxy: netsh winhttp reset proxy   →

[PS] Creating a Key File and Password File

Creating a Key File and Password File With PowerShell, we can generate a 256-bit AES encryption key: Creating the AES.key

Creating the password file

Using the key and password file

       

[PS] Working with Variables

Variables uses the $ (Dollar Sign). Takes text, integers, and store output from cmdlets. Examples: Storing strings $Var=”Hello” Storing integars $Var=”5″ $Var=”1.0″ Storing output from cmdlets $Var=Get-Services bits (Grabs a Service Controller Object) – $Var.status would output status – $Var.stop() would stop bits services – $Var.refresh() refreshes the storage Storing using user input $Var=Read-host “Enter   →

[PS] List of Aliases Used in PowerShell

HTML TABLE HelpUri ResolvedCommandName DisplayName ReferencedCommand ResolvedCommand Definition Options Description OutputType Name CommandType Visibility ModuleName Module RemotingCapability Parameters ParameterSets http://go.microsoft.com/fwlink/?LinkID=113300 ForEach-Object % -> ForEach-Object ForEach-Object ForEach-Object ForEach-Object ReadOnly, AllScope System.Collections.ObjectModel.ReadOnlyCollection1[System.Management.Automation.PSTypeName] % Alias Public None System.Collections.Generic.Dictionary2[System.String,System.Management.Automation.ParameterMetadata] http://go.microsoft.com/fwlink/?LinkID=113423 Where-Object ? -> Where-Object Where-Object Where-Object Where-Object ReadOnly, AllScope System.Collections.ObjectModel.ReadOnlyCollection1[System.Management.Automation.PSTypeName] ? Alias Public None System.Collections.Generic.Dictionary2[System.String,System.Management.Automation.ParameterMetadata]

[EXO] Manage mailbox auditing

Display the list of mailbox actions that are currently being for a mailbox for each logon type:

Enable rest of the auditing actions

Full list:

Restoring to default: