Lieber Wolfgang! Dieser Newsletter beschreibt notwendige Schritte, die Du nach der Migration auf Office365 durchführen musst. Damit Du Office365 betreiben kannst, musst Du kostenlose Lizenzen erwerben und in der ServerApp hinterlegen. Außerdem solltest Du die Kennwortablaufrichtinien ändern. Um zu den Lizenzen und dem Namen Deiner Lizenzen zu kommen, befolge bitte die folgende Anleitung. Verwalte Office365 Wechsle im Internet Explorer auf portal.microsoftonline.com Melde Dich mit Deinem Office365 Admin Account an Ändern der Kennwort Policy Wechsle auf Verwaltung - Benutzer Klicke Ändern der Kennwortablaufrichtlinie im rechten oberen Bereich des Fensters
Ändere den Ablaufzeitraum auf 720 (=maximale Anzahl von Tagen) Klicke Speichern Erwerben von Lizenzen Nun musst Du noch Lizenzen erwerben Klicke Abonnements Erwerben Suche den kostenlosen Plan A2 für Lehrpersonal bzw den kostenlosen Plan für Studenten Klicke Hinzufügen Befolge die Anweisungen, um kostenlose Lizenzen zu erwerben
Powershell Skript zur Ermittlung der Lizenznamen Starte am Schulserver die Powershell Console (Klicke Start Powershell) Kopiere das im Folgenden aufgelistete Skript in die Zwischenablage Füge das Skript in die Powershell Console Starte das Skript mit Enter Gib die Office365 Admin Zugangsdaten in den Logindialog Suche den Eintrag AccountSKUID Im Eintrag: AccountSkuID : hakgraz:standardwoffpack_student findest Du den für Deine Schule wichtigen Eintrag (in unserem Fall hakgraz) Starte die ServerApp Klicke Email Konten
Klicke Office365 Konten anlegen Trage unter Office365 Lizenz den im vorigen Schritt ermittelten Lizenznamen ein Powershell Skript zum Ermitteln der Lizenznamen #------------------------------------------------------------------------------ # # Copyright 2012 Microsoft Corporation. All rights reserved. #
# THIS CODE AND ANY ASSOCIATED INFORMATION ARE PROVIDED AS IS WITHOUT # WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THE ENTIRE RISK OF USE, INABILITY TO USE, OR # RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER. # #------------------------------------------------------------------------------ # # PowerShell Source Code # # NAME: # GetAccountSkuIdsAndServicePlanNames.ps1 # # AUTHOR(s): # Thomas Ashworth # #------------------------------------------------------------------------------ <#.SYNOPSIS Generates a CSV report containing account sku id's and service plan names..description and This script will establish a connection with the Office 365 provision web service API collect tenant license information such as account sku id's and service plan names. provisioning If a credential is specified, it will be used to establish a connection with the
web service API. to If a credential is not specified, an attempt is made to identify an existing connection the provisioning web service API. If an existing connection is identified, the existing for connection is used. If an existing connection is not identified, the user is prompted credentials so that a new connection can be established..parameter Credential service API Specifies the credential to use when connecting to the Office 365 provisioning web using Connect-MsolService..PARAMETER OutputFile the file Specifies the name of the output file. The arguement can be the full path including name, or only the path to the folder in which to save the file (uses default name). Default filename is in the format of "YYYYMMDDhhmmss MsolAccountSkuIdsAndServicePlanNames.csv" PS>.\GetAccountSkuIdsAndServicePlanNames.ps1.ps1 PS>.\GetAccountSkuIdsAndServicePlanNames.ps1.ps1 -Credential (Get-Credential)
Folder" PS>.\GetAccountSkuIdsAndServicePlanNames.ps1.ps1 -OutputFile "C:\Folder\Sub PS>.\GetAccountSkuIdsAndServicePlanNames.ps1.ps1 -OutputFile "C:\Folder\Sub Folder\File Name.csv" PS>.\GetAccountSkuIdsAndServicePlanNames.ps1.ps1 -Credential (Get-Credential) -OutputFile "C:\Folder\Sub Folder" PS>.\GetAccountSkuIdsAndServicePlanNames.ps1.ps1 -Credential (Get-Credential) -OutputFile "C:\Folder\Sub Folder\File Name.csv".INPUTS System.Management.Automation.PsCredential System.String.OUTPUTS A CSV file..notes #> [CmdletBinding()] param ( [Parameter(Mandatory = $False)]
[System.Management.Automation.PsCredential]$Credential, [Parameter(Mandatory = $False)] [ValidateNotNullOrEmpty()] [String]$OutputFile = "$((Get-Date -uformat %Y%m%d%H%M%S).ToString())_MsolAccountSkuIdsAndServicePlanNames.csv" ) Function WriteConsoleMessage <#.SYNOPSIS Writes the specified message of the specified message type to the PowerShell console..description Writes the specified message of the specified message type to the PowerShell console..parameter Message Specifies the actual message to be written to the console..parameter MessageType Specifies the type of message to be written of either "error", "warning", "verbose", or "information". The message type simply changes the background and foreground colors so that the type of message is known at a glance.
MessageType "Error" PS> WriteConsoleMessage -Message "This is an error message" - PS> WriteConsoleMessage -Message "This is a warning message" - MessageType "Warning" PS> WriteConsoleMessage -Message "This is a verbose message" - MessageType "Verbose" PS> WriteConsoleMessage -Message "This is an information message" - MessageType "Information".INPUTS System.String.OUTPUTS A message is written to the PowerShell console..notes #> [CmdletBinding()] param (
[Parameter(Mandatory = $True, Position = 0)] [ValidateNotNullOrEmpty()] [string]$message, [Parameter(Mandatory = $True, Position = 1)] [ValidateSet("Error", "Warning", "Verbose", "Information")] [string]$messagetype ) Switch ($MessageType) "Error" "Warning" "Verbose" $Message = "ERROR: SCRIPT: 0" -f $Message Write-Host $Message -ForegroundColor Black -BackgroundColor Red $Message = "WARNING: SCRIPT: 0" -f $Message Write-Host $Message -ForegroundColor Black -BackgroundColor Yellow $Message = "VERBOSE: SCRIPT: 0" -f $Message If ($VerbosePreference -eq "Continue") Write-Host $Message - ForegroundColor Gray -BackgroundColor Black "Information"
$Message = "INFORMATION: SCRIPT: 0" -f $Message Write-Host $Message -ForegroundColor Cyan -BackgroundColor Black Function TestFolderExists <#.SYNOPSIS Verifies that the specified folder/path exists..description Verifies that the specified folder/path exists..parameter Folder Specifies the absolute or relative path to the file. PS> TestFolderExists -Folder "C:\Folder\Sub Folder\File name.csv" PS> TestFolderExists -Folder "File name.csv" PS> TestFolderExists -Folder "C:\Folder\Sub Folder"
PS> TestFolderExists -Folder ".\Folder\Sub Folder".INPUTS System.String.OUTPUTS System.Boolean.NOTES #> [CmdletBinding()] param ( [Parameter(Mandatory = $True)] [ValidateNotNullOrEmpty()] [string]$folder ) If ([System.IO.Path]::HasExtension($Folder)) $PathToFile = ([System.IO.Directory]::GetParent($Folder)).FullName Else $PathToFile = [System.IO.Path]::GetFullPath($Folder) If ([System.IO.Directory]::Exists($PathToFile)) Return $True Return $False
Function GetElapsedTime <#.SYNOPSIS Calculates a time interval between two DateTime objects..description Calculates a time interval between two DateTime objects..parameter Start Specifies the start time..parameter End Specifies the end time. PM" PS> GetElapsedTime -Start "1/1/2011 12:00:00 AM" -End "1/2/2011 2:00:00 PS> GetElapsedTime -Start ([datetime]"1/1/2011 12:00:00 AM") -End ([datetime]"1/2/2011 2:00:00 PM").INPUTS System.String.OUTPUTS
System.Management.Automation.PSObject.NOTES #> [CmdletBinding()] param ( [Parameter(Mandatory = $True, Position = 0)] [ValidateNotNullOrEmpty()] [DateTime]$Start, [Parameter(Mandatory = $True, Position = 1)] [ValidateNotNullOrEmpty()] [DateTime]$End ) $TotalSeconds = ($End).Subtract($Start).TotalSeconds $objelapsedtime = New-Object PSObject # less than 1 minute If ($TotalSeconds -lt 60) Days -Value 0 Hours -Value 0
Minutes -Value 0 Seconds -Value $($TotalSeconds) # more than 1 minute, less than 1 hour If (($TotalSeconds -ge 60) -and ($TotalSeconds -lt 3600)) Days -Value 0 Hours -Value 0 Minutes -Value $([Math]::Truncate($TotalSeconds / 60)) Seconds -Value $([Math]::Truncate($TotalSeconds % 60)) # more than 1 hour, less than 1 day If (($TotalSeconds -ge 3600) -and ($TotalSeconds -lt 86400)) Days -Value 0 Hours -Value $([Math]::Truncate($TotalSeconds / 3600)) Minutes -Value $([Math]::Truncate(($TotalSeconds % 3600) / 60)) Seconds -Value $([Math]::Truncate($TotalSeconds % 60))
# more than 1 day, less than 1 year If (($TotalSeconds -ge 86400) -and ($TotalSeconds -lt 31536000)) Days -Value $([Math]::Truncate($TotalSeconds / 86400)) Hours -Value $([Math]::Truncate(($TotalSeconds % 86400) / 3600)) Minutes -Value $([Math]::Truncate((($TotalSeconds - 86400) % 3600) / 60)) Seconds -Value $([Math]::Truncate($TotalSeconds % 60)) Return $objelapsedtime Function ConnectProvisioningWebServiceAPI <#.SYNOPSIS Connects to the Office 365 provisioning web service API..DESCRIPTION Connects to the Office 365 provisioning web service API. provisioning If a credential is specified, it will be used to establish a connection with the web service API.
connection to existing prompted for If a credential is not specified, an attempt is made to identify an existing the provisioning web service API. If an existing connection is identified, the connection is used. If an existing connection is not identified, the user is credentials so that a new connection can be established..parameter Credential service API Specifies the credential to use when connecting to the provisioning web using Connect-MsolService. PS> ConnectProvisioningWebServiceAPI PS> ConnectProvisioningWebServiceAPI -Credential.INPUTS [System.Management.Automation.PsCredential].OUTPUTS.NOTES #> [CmdletBinding()] param
( [Parameter(Mandatory = $False)] [System.Management.Automation.PsCredential]$Credential ) # if a credential was supplied, assume a new connection is intended and create a new # connection using specified credential If ($Credential) 0)) If ((!$Credential) -or (!$Credential.Username) -or ($Credential.Password.Length -eq WriteConsoleMessage -Message ("Invalid credential. Please verify the credential and try again.") -MessageType "Error" Exit # connect to provisioning web service api WriteConsoleMessage -Message "Connecting to the Office 365 provisioning web service API. Please wait..." -MessageType "Information" Connect-MsolService -Credential $Credential If($? -eq $False)WriteConsoleMessage -Message "Error while connecting to the Office 365 provisioning web service API. Quiting..." -MessageType "Error";Exit Else WriteConsoleMessage -Message "Attempting to identify an open connection to the Office 365 provisioning web service API. Please wait..." -MessageType "Information" $getmsolcompanyinformationresults = Get-MsolCompanyInformation -ErrorAction SilentlyContinue
If (!$getmsolcompanyinformationresults) WriteConsoleMessage -Message "Could not identify an open connection to the Office 365 provisioning web service API." -MessageType "Information" If (!$Credential) $Credential = $Host.UI.PromptForCredential("Enter Credential", administrator account.", "Enter the username and password of an Office 365 "", "usercreds") If ((!$Credential) -or (!$Credential.Username) -or ($Credential.Password.Length -eq 0)) WriteConsoleMessage -Message ("Invalid credential. Please verify the credential and try again.") -MessageType "Error" Exit # connect to provisioning web service api WriteConsoleMessage -Message "Connecting to the Office 365 provisioning web service API. Please wait..." -MessageType "Information" Connect-MsolService -Credential $Credential If($? -eq $False)WriteConsoleMessage -Message "Error while connecting to the Office 365 provisioning web service API. Quiting..." -MessageType "Error";Exit $getmsolcompanyinformationresults = Get-MsolCompanyInformation - ErrorAction SilentlyContinue WriteConsoleMessage -Message ("Connected to Office 365 tenant named: `"0`"." -f $getmsolcompanyinformationresults.displayname) -MessageType "Information"
Else WriteConsoleMessage -Message ("Connected to Office 365 tenant named: `"0`"." -f $getmsolcompanyinformationresults.displayname) -MessageType "Warning" If (!$Script:Credential) $Script:Credential = $Credential Function GetServicePlanNames <#.SYNOPSIS Returns the service plan names that belong to an account sku id..description Returns the service plan names that belong to an account sku id..parameter $Object Specifies an object representing the results returned by the cmdlet named Get-MsolAccountSku. PS> GetServicePlanNames -$Object $Results.servicestatus.INPUTS
.OUTPUTS System.String.NOTES #> [CmdletBinding()] param ( [Parameter(Mandatory = $True)] [ValidateNotNullOrEmpty()] $Object ) If ($($Object).length -gt 1) $count = 1 $Object ForEach-Object $Result += "0" -f $_.serviceplan.psobject.properties.item("servicename").value Else If ($count -lt $($Object).length) $Result += "," $count++
$Object ForEach-Object $Result += "0" -f $_.serviceplan.psobject.properties.item("servicename").value Return $Result # ----------------------------------------------------------------------------- # # Main Script Execution # # ----------------------------------------------------------------------------- $Error.Clear() $ScriptStartTime = Get-Date # verify that the MSOnline module is installed and import into current powershell session If (!([System.IO.File]::Exists(("0\modules\msonline\Microsoft.Online.Administration.Automation.PS Module.dll" -f $pshome)))) WriteConsoleMessage -Message ("Please download and install the Microsoft Online Services Module.") -MessageType "Error" Exit $getmoduleresults = Get-Module If (!$getmoduleresults) Import-Module MSOnline -ErrorAction SilentlyContinue
Else $getmoduleresults ForEach-Object If (!($_.Name -eq "MSOnline"))Import-Module MSOnline -ErrorAction SilentlyContinue # verify output directory exists for results file WriteConsoleMessage -Message ("Verifying folder: 0" -f $OutputFile) -MessageType "Verbose" If (!(TestFolderExists $OutputFile)) "Error" WriteConsoleMessage -Message ("Directory not found: 0" -f $OutputFile) -MessageType Exit # if a filename was not specified as part of $OutputFile, auto generate a name # in the format of YYYYMMDDhhmmss.csv and append to the directory path If (!([System.IO.Path]::HasExtension($OutputFile))) If ($OutputFile.substring($OutputFile.length - 1) -eq "\") $OutputFile += "0_MsolAccountSkuIdsAndServicePlanNames.csv" -f (Get-Date - uformat %Y%m%d%H%M%S).ToString() Else $OutputFile += "\0_MsolAccountSkuIdsAndServicePlanNames.csv" -f (Get-Date - uformat %Y%m%d%H%M%S).ToString() ConnectProvisioningWebServiceAPI -Credential $Credential
# get account sku data WriteConsoleMessage -Message "Getting account sku id's and service plan names. Please wait..." - MessageType "Information" $AccountSkuAndServicePlanDetails = @() Get-MsolAccountSku ForEach-Object $objproperties = New-Object PSObject Add-Member -InputObject $objproperties -MemberType NoteProperty -Name "AccountSkuID" -Value $_.accountskuid Add-Member -InputObject $objproperties -MemberType NoteProperty -Name "ServiceNames" -Value $(GetServicePlanNames $_.servicestatus) $AccountSkuAndServicePlanDetails += $objproperties If ($OutputFile) WriteConsoleMessage -Message "Saving results to CSV file. Please wait..." -MessageType "Information" $AccountSkuAndServicePlanDetails Export-Csv -Path $OutputFile -NoTypeInformation # script is complete $ScriptStopTime = Get-Date $elapsedtime = GetElapsedTime -Start $ScriptStartTime -End $ScriptStopTime WriteConsoleMessage -Message ("Script Start Time : 0" -f ($ScriptStartTime)) -MessageType "Information" WriteConsoleMessage -Message ("Script Stop Time : 0" -f ($ScriptStopTime)) -MessageType "Information"
WriteConsoleMessage -Message ("Elapsed Time : 0:N0.1:N0:2:N0:3:N1 (Days.Hours:Minutes:Seconds)" -f $elapsedtime.days, $elapsedtime.hours, $elapsedtime.minutes, $elapsedtime.seconds) -MessageType "Information" WriteConsoleMessage -Message ("Output File : 0" -f $OutputFile) -MessageType "Information" Format-List -InputObject $AccountSkuAndServicePlanDetails #------------------------------------------------------------------------------- # # End of Script. # #------------------------------------------------------------------------------- Manuelles Zuweisen von Lizenzen Alternativ zur ServerApp kannst Du Lizenzen auch manuell zuweisen
Klicke Verwaltung Benutzer Kreuze die oberste Checkbox an Klicke Bearbeiten
Klicke Weiter
Gib den Benutzerstandort Österreich an Klicke Weiter
Klicke Vorhandene Lizenzzuweisungen ersetzen Kreuze den Plan A2 für Studenten (wie in der Abbildung) an Klicke Absenden