Showing posts with label office. Show all posts
Showing posts with label office. Show all posts

Monday, March 2, 2015

Office 365 PowerShell Commands

Office 365 PowerShell Commands


Here are some powershell commands that I used with Office 365 to automate my Cutover migration.  In these examples Im using my domain skillsinc.com where your domain should be.
These are mostly commands you would use after you have moved your mailboxes to Office 365.

Open the Microsoft Online Services Module for Windows PowerShell
If you want to run any commands that have Msol in them, like Get-MsolUser, you need to run this first:
$Cred = Get-Credential
Connect-MsolService -Credential $cred


If your not running on your ADFS server, you may need to connect to it first with this:
Set-MsolAdfscontext -Computer adfs1

If you want to run any commands that involve the mailboxes, like Get-Mailbox, you need to run this first:$Cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
https://ps.outlook.com/powershell -Credential $Cred -Authentication:Basic -AllowRedirection
Import-PSSession $Session
Assign Licenses
Check the name of the license pack we need:
Get-MsolAccountSku

Assign everyone the same licenses at one time instead of doing them one at a time in the 365 console. 
This is the the license for Live@EDU Faculty
Get-MsolUser | Set-MsolUserLicense -addlicenses skillsinc:STANDARDWOFFPACK_FACULTY

Assign location
Get-MsolUser | Set-MsolUser -UsageLocation "US”

Set Timezone (Run these two lines one at a time)
$users = Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq UserMailbox)}
$users | %{Set-MailboxRegionalConfiguration $_.Identity -TimeZone "Pacific Standard Time" }

Fix ImmutableId if its missing (Dont mess with this unless you know for sure why)
$samID = "johndoe"
$searcher = [DirectoryServices.DirectorySearcher] "(samaccountname=$samID)"
$user = $searcher.FindAll()|%{$_.GetDirectoryEntry()}
$guid = [Guid]($user.Properties["objectGUID"][0])
$base64 = [System.Convert]::ToBase64String($guid.ToByteArray())
set-msoluser -UserPrincipalName johndoe@skillsinc.com -ImmutableId $base64


Check to see what everyone ImmutableID is
Get-MsolUser -all | where {$_.isLicensed -eq $true} | select-object userprincipalname,immutableid

Force Removal off all deleted mailboxes from Recycle Bin
Get-MsolUser -ReturnDeletedUsers | Remove-MsolUser -RemoveFromRecycleBin -Force


Give yourself access to all the mailboxes
Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq UserMailbox) -and (Alias -ne ed)} | Add-MailboxPermission -User ed@skillsinc.com -AccessRights fullaccess -InheritanceType all -Automapping $false

Find out how much mail is out there and send it to a text file
Get-User -Filter {RecipientType -eq "UserMailbox"} | Get-MailboxStatistics | ft DisplayName, TotalItemSize, ItemCount | Sort-Object TotalItemSize -Descending > mailboxes.txt

When users are added to the HR inbox they need to be able to forward emails
Add-RecipientPermission HR-Inbox@skillsinc.com -AccessRights SendAs -Trustee hr-user@skillsinc.com

Convert a mailbox into a Room Resource and let people add meetings to it
Set-Mailbox -Identity ConferenceRoom1 -Type Room
Set-MailboxFolderPermission -identity ConferenceRoom1@skillsinc.com:calendar -user Default -AccessRights Author

Close the session after your done...
Remove-PSSession $Session

More Office 365 tips coming soon!
Read more »

Sunday, March 1, 2015

Outlook 2013 Folder Pane empty blue gone no folders after September Office Update caused by KB2817630 patch

Recently, opening my Outlook 2013, the folder pane was empty. Indeed, it looked not really to be empty. It was filled with blue color and the was some mouseover effect happening moving the pointer over it.

How-i-fixed-it:
It turned out, that the September update of Office Software can cause this issue in case a certain combination of Outook.exe and mso.dll happens. Its the KB2817630 patch causing the problem in case the August Cumulative update is NOT installed on the Computer.

Heres what the TechNet blog says:
"Due to a version incompatibility between outlook.exe and mso.dll, a mismatched reference to a data structure causes the “Minimize” button in the navigation
pane to render incorrectly, typically extremely large to the point that the navigation pane is "invisible" to the user. The issue only manifests when incompatible versions of outlook.exe and mso.dll exist on the system."

It only happes to:
  • Office 2013 Standard
  • Office 2013 Professional Plus
  • Heres a good description, how to fix it: http://blogs.technet.com/b/office_sustained_engineering/archive/2013/09/11/outlook-folder-pane-disappears-after-installing-september-2013-public-update.aspx

    Where can you find the Outlook.exe and mso.dll Version Information?
    Go to File -> Office Account -> Info about Outlook

    Read more »