Tag Archives: Office 365

Remove Office 365 Teaching Callouts

The popups with ‘Got it’ that constantly appear

 

Disable them using the following:

 

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\TeachingCallouts]
“DontShowTeachingCallouts”=dword:00000001

 

No corresponding HKLM policy registry location exists – so its a per user setting.

Get FolderID (FolderStoreID) for all mailboxes

 

# Get-AllMailboxFolderStatistics.ps1
#
# Can be used to pull FolderID for all mailboxes (FolderID is often referenced in the audit logs).
#
# This can take a large time to run depending on number of mailboxes and number of folders (15 minutes is not uncommon)
#
# Outputs to a file called AllMailboxFolderStatistics.csv - this can grow into tens of MB, and in excess of 10000 rows, depending on tenant.
# If the file exists at the start, the script will abort.

$OutputFile="AllMailboxFolderStatistics.csv"
if(-Not (test-path -path $OutputFile))
{
    $Mailboxes=Get-Mailbox
    foreach ($Mailbox in $Mailboxes)
    {
        $stats=get-exomailboxfolderstatistics -userprincipalname $mailbox.userprincipalname
        $stats | export-csv $OutputFile -notype -append
    }
}
else
{
    write-error "$OutputFile already exists - please remove this file before running."
}

 

Creating 365 Security Groups via Powershell

Quite simply

 

$ObjectsToCreate=import-csv groups.csv

foreach ($Object in $ObjectsToCreate)

{

    new-msolgroup -description $Object.description -Displayname $Object.name -managedby "anonit@anonit.net" -tenantid 36e0e315-9f63-497e-aca1-58b47254c2aa

}


Also…. lets not forget that the powershell command new-guid exists!

Add an alias to multiple users in 365

Adding an alias to multiple users in 365.  in the example below, all users that have a primary SMTP address that matches nsw.anonit.net will have the $($user.alias)@qld.anonit.net alias added.

Eg:

john.smith@nsw.anonit.net will have john.smith@qld.anonit.net alias added, whereas, jane.doe@vic.anonit.net will not have any alias added.

$users = Get-Mailbox | Where-Object{$_.PrimarySMTPAddress -match "nsw.anonit.net"}

foreach($user in $users){

    Write-Host "Adding Alias $($user.alias)@qld.anonit.net"

    Set-Mailbox $user.PrimarySmtpAddress -EmailAddresses @{add="$($user.Alias)@qld.anonit.net"}

}