Powershell
Many Office 365 deployments struggle with delegating permissions to specific actions or areas of administration inside the tenant. Many simple administrative activities such as reading licensing and service plan information at the tenant and user level, require administrative access to the tenant. What Office 365 Administrator Role should be used
Here is a good reference on detecting whether a PowerShell script is currently running with Administrator rights, and relaunching with elevated permissions if not. Courtesy of Bruno Saille’s JEA Helper Tool 2.0: https://gallery.technet.microsoft.com/JEA-Helper-Tool-20-6f9c49dd ######################################################################################## #Make sure we run elevated, or relaunch as admin ######################################################################################## $CurrentScriptDirectory = $PSCommandPath.Substring(0,$PSCommandPath.LastIndexOf(“\”)) Set-Location $CurrentScriptDirectory
There have been several Windows Azure Active Directory Modules. Here is a quick reference. What Versions Exist? Microsoft’s evolution and naming of the modules has caused some confusion: V1. The initial PowerShell module for Azure AD is named “MSOnline” and was also known as the Office 365 PowerShell module https://docs.microsoft.com/en-us/powershell/module/msonline/?view=azureadps-1.0
Many times while authoring PowerShell scripts, the expected output will be incorrect because PowerShell ISE does not automatically cleanup it’s variable between manual runs of a script. In my experience this poses two practical issue which lead to incorrect script results: 1) If the variable is not explicitly re-initialized in
In hybrid Office 365 deployments (either Exchange Online, Skype for Business Online, or SharePoint Online), often you need to know whether a particular user account is sourced (e.g. created) from on-premises AD, or in the cloud (created in Azure AD). This can be see in the Office 365 Portal (under
I came across a very interesting PowerShell technique today courtesy of Guy Bachar’s TechNet Gallery Script Exchange Online Audit Log Report (HTML Format). This PowerShell script contains .NET code which calls the local Windows Credential Manager. Pheww! Could come in handy. …. . ###################################################################### # API to load credential from
One powerful aspect of PowerShell is that it is a loosely typed language. The advantage to script developers is that they can assign an untyped variable to almost anything. This makes script development faster and usually easier because variable can be assigned to almost anything without having to fully understand the