On of our core fundamentals at Altitude is that if something can be automated, it should be. So PowerShell is core to our business.
This lead us to create our AltitudeCore.ps1 script that is a collection of 1000+ functions for everything that we work with, mainly Office 365, Exchange Online, Lync Online, SharePoint Online, Windows Azure and everything else in the cloud that you can run PowerShell against.
From our PS repository: will be a blog series with functions from the main script, we will not publish the core script at this time, just the functions but as many of them as possible. The first one is something I played with this weekend for a presentation at a TechX event http://office365.techx.se/ in Sweden the 23-24 of January (sorry for the Swedish descriptions of the session)
Säkerhet i Office 365
En vanlig missuppfattning är att en Office 365-lösning skulle försämra säkerheten och en del av de kunderna som tvekar på att gå upp i molnet tvekar just på grund av säkerhetsfrågorna. Dock bottnar nästan alltid denna rädsla i okunskap och vi kommer under denna session att gå igenom många av alla de säkerhetsfunktioner som man så enkelt får tillgång till i Office 365 och Azure. Vi går bland annat igenom Azure Rights Management och hur det fungerar med Office 365, Multifactor authentication, Exchange Protection (TLS, DLP, Device Protection, OWA for iOS) och Compliance.
Level: 300 Talare: Tommy Clarke
The function is called 851) *Enabling the Windows Azure Rights Management Service* and what it does is to automatically enable Windows Azure RMS (WARMS) for the tenant that you are logged on with.
You will have to install the Windows Azure AD Rights Management Administration Tool first from http://www.microsoft.com/en-us/download/details.aspx?id=30339 and then connect to your Office 365 tenant and then to Azure
Import-ModuleAADRM
$cred=Get-Credential
Connect-AadrmService-Credential$cred-Verbose
I did not include the Office 365 connection here so just add these 3 lines to what you normally do.
Now when you are connected to Windows Azure AD Rights Management via PowerShell you can run this and WARMS should be enabled
if# Verifying if Azure Rights Management is enabled
((Get-Aadrm)-eq“Enabled”){
Write-Host“`nAzure rights management is already enabled.`n”-ForegroundColorGreen
}
else{
$AzureLocation=Read-Host“Please type NA for North America, EU for Europe, AP for Asia Pacific or SA for South America”
Write-Host“`nStep 1: Use the Office 365 Admin Center to activate Windows Azure Active Directory Rights Management.`n”-ForegroundColorGreen
Enable-Aadrm
Write-Host“`nAzure rights management is being enabled.`n”-ForegroundColorGreen
Write-Host“`nPlease wait.`n”-ForegroundColorGreen
Start-Sleep-Seconds15
Write-Host“`nPlease note that there are manual stepps to be taken to fully enable this feature.`n”-ForegroundColorYellow
Write-Host“`nRead more at the page I just opened for you.`n”-ForegroundColorYellow
$IE=new-object-cominternetexplorer.application
$IE.navigate2(“http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/set-up-information-rights-management-irm-insharepoint-online-HA102895193.aspx”)
$IE.visible=$true
Write-Host“`nStep 2: Use the Shell to configure the RMS Online key sharing location in Exchange Online.`n”-ForegroundColorGreen
if($AzureLocation-eq“NA”){Set-IRMConfiguration-RMSOnlineKeySharingLocationhttps://sp-rms.na.aadrm.com/TenantManagement/ServicePartner.svc}
elseif($AzureLocation-eq“EU”){Set-IRMConfiguration-RMSOnlineKeySharingLocationhttps://sp-rms.eu.aadrm.com/TenantManagement/ServicePartner.svc}
elseif($AzureLocation-eq“AP”){Set-IRMConfiguration-RMSOnlineKeySharingLocationhttps://sp-rms.ap.aadrm.com/TenantManagement/ServicePartner.svc}
elseif($AzureLocation-eq“AP”){Set-IRMConfiguration-RMSOnlineKeySharingLocationhttps://sp-rms.sa.aadrm.com/TenantManagement/ServicePartner.svc }
Start-Sleep-Seconds10
Write-Host“`nStep 3: Use the Shell to import the Trusted Publishing Domain (TPD) from RMS Online.`n”-ForegroundColorGreen
Import-RMSTrustedPublishingDomain-RMSOnline-name“RMS Online”
Start-Sleep-Seconds10
Write-Host“`nStep 4: Use the Shell to enable IRM in Exchange Online.`n”-ForegroundColorGreen
Set-IRMConfiguration-InternalLicensingEnabled$true
Start-Sleep-Seconds10
Write-Host“`nStep 5: Testing configuration, OVERALL RESULT should be saying PASS.`n”-ForegroundColorGreen
Test-IRMConfiguration-RMSOnline
Please post comments and enhancements bellow as im eager to enhance this and to learn more PowerShell as I still consider myself kind of a noob at PowerShell but I love to learn it and its super fun to automate stuff with it.
Until next time have a good 2014 and I hope to see many of you ate TechX Sweden http://office365.techx.se