SlideShare a Scribd company logo
1 of 66
Thanks to the Sponsors!
• Thorbjørn Værp
• Principal Consultant |
• Kristiansand Norway
• @vaerpn | tv@pointtaken.no
• http://sharepoint13.org
#SPSLONDON
About me
#SPSLONDON
About me
#SPSLONDON
About me
#SPSLONDON
About me
#SPSLONDON
You!
#SPSLONDON
AGENDA
• 4 steps to setup O365 PS Environment
#SPSLONDON
AGENDA
• 4 steps to setup O365 PS Environment
• Foreach-object | CSV Import Users to O365
#SPSLONDON
AGENDA
• 4 steps to setup O365 PS Environment
• Foreach-object | CSV Import Users to O365
• Advanced O365 UserManagement
Maslow's Hierarchy of Needs
4 steps to setup O365 PS Environment
• Step 1 - Install some binaries
• Step 2 - Load some modules
• Step 3 - Connect to something in Office 365
• Step 4 - Use [aka Copy with Pride]
#SPSLONDON
Step1 Install some binaries
• http://go.microsoft.com/fwlink/?LinkID=286152
#SPSLONDON
#SPSLONDON
Step 1 – Azure AD PS Module Version release
• http://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version-
release-history.aspx
#SPSLONDON
#SPSLONDON
#SPSLONDON
Step 1 – Install SPO Management Shell
• https://www.microsoft.com/en-us/download/details.aspx?id=35588
#SPSLONDON
#SPSLONDON
1 – Install Skype for Business Online
#SPSLONDON
• https://www.microsoft.com/en-us/download/details.aspx?id=39366
#SPSLONDON
#SPSLONDON
2 - Load some modules
#SPSLONDON
Create the ISE profile
if (!(test-path $profile ))
{new-item -type file -path $profile -force}
2 Load some modules – Connect to all
#SPSLONDON
https://technet.microsoft.com/en-us/library/dn568015.aspx
2 Load some modules – Verify
#SPSLONDON
Get-Module | Select-Object Name, Path | FL
3. Connect to something –> Office 365 /AAD
#SPSLONDON
3 Connect to -> SPO
#SPSLONDON
3 Connect to -> Exchange
#SPSLONDON
Remember to Disconnect!
3 Connect to -> Skype
#SPSLONDON
4 Use it
• Notepad ++, or Visual Studio
#SPSLONDON
4 Use it -> MSDN
https://msdn.microsoft.com/en-us/powershell/mt173057.aspx
4 Use it -> SP Command Builder
https://www.microsoft.com/resources/TechNet/en-
us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html #SPSLONDON
4 Use it ->Script Center
#SPSLONDON
https://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Val
ue=Office365
4 Use it ->Disclaimer
#SPSLONDON
No Animals was harmed during the making of these scipts! 
Feel free to Copy with Pride any script you might find usefull,
but it’s all at your own risk!
I encourage you to test thoroughly on a test/dev O365 tenant.
@vaerpn
4 steps to setup O365 PS Environment
• Step 1 - Install some binaries
• Step 2 - Load some modules
• Step 3 - Connect to something in Office 365
• Step 4 - Use [aka Copy with Pride]
#SPSLONDON
Maslow's Hierarchy of Needs
#SPSLONDON
AGENDA
• 4 steps to setup O365 PS Environment
• Foreach-object | CSV Import Users to O365
• Advanced O365 UserManagement
#SPSLONDON
AGENDA
• 4 steps to setup O365 PS Environment
• Foreach-object | CSV Import Users to O365
• Advanced O365 UserManagement
Foreach-object| CSV Import Users to O365
#SPSLONDON
Step1: Create a nice Excel file
HowTo: CSV Import Users to O365
#SPSLONDON
Save it as Comma delimeted .csv when you need to run it
HowTo: CSV Import Users to O365
#SPSLONDON
Open in Notepad ++
HowTo: CSV Import Users to O365
#SPSLONDON
Open in Notepad ++, Replace ; with , [Ctrl+H] and set Encoding to UTF-8
HowTo: CSV Import Users to O365
#SPSLONDON
Much better 
HowTo: CSV Import Users to O365
#SPSLONDON
Import-CSV foreach-object
HowTo: CSV Import Users to O365
#SPSLONDON
Import-CSV Path | Foreach-object
HowTo: CSV Import Users to O365
#SPSLONDON
Filter columns in Excel
Maslow's Hierarchy of Needs
#SPSLONDON
AGENDA
• 4 steps to setup O365 PS Environment
• Foreach-object | CSV Import Users to O365
• Advanced O365 UserManagement
#SPSLONDON
AGENDA
• 4 steps to setup O365 PS Environment
• Foreach-object | CSV Import Users to O365
• Advanced O365 UserManagement
Advanced O365 Useradmin
#SPSLONDON
No Animals was harmed during the making of these scipts! 
Feel free to Copy with Pride any script you might find usefull,
but it’s all at your own risk!
I encourage you to test thoroughly on a test/dev O365 tenant.
@vaerpn
>DISCLAIMER
Advanced O365 Useradmin
>License O365 w ADUC Groups
#SPSLONDON
Scenario:
You have a new Employee, the IT-Dep add Him/Her to Active Directory Users, include
Security Groups and mail enables Him/Her.
Then AAD Connect synchronize all new user objects evry 30 minutes. Then, after the
sync the IT-Dept log on to the O365 tenant and assign the new users a license
E5/E37E1.
Challenge with this:
It’s manuel steps
Two repositories for license assignment, lack of reporting
Free up licenses
Advanced O365 Useradmin
>License O365 w ADUC Groups
#SPSLONDON
Sollution:
Create a PowerShell script that adds/modifies user licenses based upon lokal AD
Group membership.
Automate the script by the use of Scheduled Tasks, or create a service.
All reporting are done in ADUC
The User that runs this script is a Domain Admin in AD and Global Admin in O365
Advanced O365 Useradmin
>License O365 w ADUC Groups
#SPSLONDON
XML file:
Advanced O365 Useradmin
>License O365 w ADUC Groups
#SPSLONDON
XML file:
Advanced O365 Useradmin
>License O365 w ADUC Groups
#SPSLONDON
If I show my script to a Dev person what is the reaction?
Advanced O365 Useradmin
>License O365 w ADUC Groups
#SPSLONDON
Maslow's Hierarchy of Needs
Advanced O365 Useradmin
>Get-MSoluser
#SPSLONDON
Get-MsolUser Cmdlet and Properties
Get-MsolUser cmdlet supports a number of user properties. Properties that I use in my daily operational
tasks are explained in the table below. The below table does not list all the properties supported by the Get-
MsolUser cmdlet, but the common user properties that you might find useful.
Advanced O365 Useradmin
>Get-MSoluser
#SPSLONDON
Get-MsolUser Cmdlet and Properties
Property When to use Property
AlternateEmailAddresses Displays the alternate email address assigned to an Office 365 user.
Department As the property name suggests.
DisplayName Display Name of the user. This property is required when creating a new user in Office 365.
IsLicensed Returns TRUE if user is licensed for any Office 365 Plans and FALSE if not licensed.
LastDirSyncTime If you have users synced from On-premises Active Directory, use this property to get the last date and time of the synchronization. In other words, use this property if
you are using “Synchronized Identity” deployment approach and you want to know the last synchronization status of a user.
LastPasswordChangeTimestamp Use this property to get date and time of the last password changed for Office 365 users.
LicenseReconciliationNeeded Whether or not the user currently has a mailbox without an Office 365 license. I will explain more about this property in next part of this article series.
Licenses This is a multi-valued property. It contains the Office 365 licenses assigned to the user. I will explain more about Licenses property later in this article series.
LiveId This is the user’s unique ID to log on to Office 365.
MobilePhone As the name suggests.
OverallProvisioningStatus Whether or not the user has been provisioned for Office 365 services.
PasswordNeverExpires Use this property to see if the user is forced to change password every 90 days
StrongPasswordRequired Returns True or False. True indicates that the user is required to set the strong password when they change their password next time.
UsageLocation This is a two letter Country code and must be set in order to assign Office 365 Licenses. So it is fairly simple to understand that an Office 365 user must be assigned
with a UsageLocation before the user can use the Office 365 services.
UserPrincipalName As the name suggests.
WhenCreated The creation date of the user.
Advanced O365 Useradmin
>Get-MSoluser
#SPSLONDON
Get-MsolUser cmdlet Parameters
Get-MsolUser cmdlet supports various parameters that you can use to get a specific type of information for
Office 365 users. For example, by using “–EnabledFilter” parameter you can return users that are enabled
or disabled. Similarly, you can use “-HasErrorsOnly” parameter to return users that have validation errors. I
have compiled a list of Get-MsolUser parameters with examples in the table below:
Advanced O365 Useradmin
>Get-MSoluser
#SPSLONDON
Get-MsolUser cmdlet Parameters
Parameter When to use Example
-EnabledFilter Use –EnabledFilter parameter to get a list of users that are enabled or disabled. You can
use EnabledOnly or DisabledOnly values with –EnabledFilter parameter.
Get-MsolUser –All –EnabledFilter DisabledOnly
Get-MsolUser –All –EnabledFilter EnabledOnly
-DomainName Use –DomainName parameter to get results for a specific Office 365 domain. Get-MsolUser –All –DomainName <DomainName>
-
ReturnDeletedUs
ers
Use –ReturnDeletedUsers parameter to get a list of users that were deleted from Office
365, but are still present in the Ofice 365 Recycle bin.
Get-MsolUser –ReturnDeletedUsers
-SearchString Use –SearchString parameter to search users across Office 365 Tenant. Get-MsolUser –All –SearchString Dean
Above command returns only users with an email address or
display name staring with the “Dean” string.
-Synchronized Use –Synchronized parameter if you need to return a list of users that are synchronized
from On-Premises Active Directory.
Get-MsolUser –All –Synchronized
-
UnlicensedUsers
Only
Use –UnlicensedUsersOnly if you wish to see a list of users that are associated with an
Office 365 license.
Get-MsolUser –All –UnlicensedUsersOnly
-MaxResults OR -
All
By default Get-MsolUser returns 500 results in a command. Use –All parameter to return all
results. You can use either –MaxResults or –All parameter.
Get-MsolUser –All –UnlicensedUsersOnly
Get-MsolUser –MaxResults 2000 –UnlicensedUsersOnly
Maslow's Hierarchy of Needs
Advanced O365 Useradmin
>More
#SPSLONDON
Get-LastLogonStats.ps1 by Alan Byrne:
https://gallery.technet.microsoft.com/scriptcenter/E
xport-Office-365-User-7fc0b73f
Disable-ClutterOnByDefault.ps1 by Matt mc Nabb:
https://gallery.technet.microsoft.com/scriptcenter/D
isable-Clutters-For-All-41834444
Maslow's Hierarchy of Needs
#SPSLONDON
AGENDA
• 4 steps to setup O365 PS Environment
• Foreach-object | CSV Import Users to O365
• Advanced O365 UserManagement
Questions ?????
@vaerpn | tv@pointtaken.no
#SPSLONDON
Thank You!

More Related Content

What's hot

ECS 19 Anil Erduran - simplifying microsoft architectures with aws services
ECS 19 Anil Erduran - simplifying microsoft architectures with aws servicesECS 19 Anil Erduran - simplifying microsoft architectures with aws services
ECS 19 Anil Erduran - simplifying microsoft architectures with aws servicesEuropean Collaboration Summit
 
Wally Mead - Upgrading to system center 2012 r2 configuration manager
Wally Mead - Upgrading to system center 2012 r2 configuration managerWally Mead - Upgrading to system center 2012 r2 configuration manager
Wally Mead - Upgrading to system center 2012 r2 configuration managerNordic Infrastructure Conference
 
What's new in SharePoint 2013
What's new in SharePoint 2013What's new in SharePoint 2013
What's new in SharePoint 2013sboldt
 
SFDC Inbound Integrations
SFDC Inbound IntegrationsSFDC Inbound Integrations
SFDC Inbound IntegrationsSujit Kumar
 
From Event Receivers to SharePoint Webhooks
From Event Receivers to SharePoint WebhooksFrom Event Receivers to SharePoint Webhooks
From Event Receivers to SharePoint WebhooksAndré Vala
 
Automated Compliance and Governance with AWS Config and AWS CloudTrail
Automated Compliance and Governance with AWS Config and AWS CloudTrailAutomated Compliance and Governance with AWS Config and AWS CloudTrail
Automated Compliance and Governance with AWS Config and AWS CloudTrailAmazon Web Services
 

What's hot (7)

ECS 19 Anil Erduran - simplifying microsoft architectures with aws services
ECS 19 Anil Erduran - simplifying microsoft architectures with aws servicesECS 19 Anil Erduran - simplifying microsoft architectures with aws services
ECS 19 Anil Erduran - simplifying microsoft architectures with aws services
 
Wally Mead - Upgrading to system center 2012 r2 configuration manager
Wally Mead - Upgrading to system center 2012 r2 configuration managerWally Mead - Upgrading to system center 2012 r2 configuration manager
Wally Mead - Upgrading to system center 2012 r2 configuration manager
 
What's new in SharePoint 2013
What's new in SharePoint 2013What's new in SharePoint 2013
What's new in SharePoint 2013
 
SFDC Inbound Integrations
SFDC Inbound IntegrationsSFDC Inbound Integrations
SFDC Inbound Integrations
 
From Event Receivers to SharePoint Webhooks
From Event Receivers to SharePoint WebhooksFrom Event Receivers to SharePoint Webhooks
From Event Receivers to SharePoint Webhooks
 
Automated Compliance and Governance with AWS Config and AWS CloudTrail
Automated Compliance and Governance with AWS Config and AWS CloudTrailAutomated Compliance and Governance with AWS Config and AWS CloudTrail
Automated Compliance and Governance with AWS Config and AWS CloudTrail
 
Training
TrainingTraining
Training
 

Viewers also liked

Install Active Directory PowerShell Module on Windows 10
Install Active Directory PowerShell Module on Windows 10Install Active Directory PowerShell Module on Windows 10
Install Active Directory PowerShell Module on Windows 10VCP Muthukrishna
 
How To Manage Yum Packages Interactive Shell
How To Manage Yum Packages Interactive ShellHow To Manage Yum Packages Interactive Shell
How To Manage Yum Packages Interactive ShellVCP Muthukrishna
 
How To Manage Yum Packages - Group Packages
How To Manage Yum Packages - Group PackagesHow To Manage Yum Packages - Group Packages
How To Manage Yum Packages - Group PackagesVCP Muthukrishna
 
How To Manage Yum Repositories
How To Manage Yum RepositoriesHow To Manage Yum Repositories
How To Manage Yum RepositoriesVCP Muthukrishna
 
How To Yum Package Installation
How To Yum Package InstallationHow To Yum Package Installation
How To Yum Package InstallationVCP Muthukrishna
 

Viewers also liked (8)

How To List YUM Packages
How To List YUM PackagesHow To List YUM Packages
How To List YUM Packages
 
Install Active Directory PowerShell Module on Windows 10
Install Active Directory PowerShell Module on Windows 10Install Active Directory PowerShell Module on Windows 10
Install Active Directory PowerShell Module on Windows 10
 
How To Manage Yum Packages Interactive Shell
How To Manage Yum Packages Interactive ShellHow To Manage Yum Packages Interactive Shell
How To Manage Yum Packages Interactive Shell
 
How To Manage Yum Packages - Group Packages
How To Manage Yum Packages - Group PackagesHow To Manage Yum Packages - Group Packages
How To Manage Yum Packages - Group Packages
 
How To Manage Yum Cache
How To Manage Yum CacheHow To Manage Yum Cache
How To Manage Yum Cache
 
How To Manage Yum Repositories
How To Manage Yum RepositoriesHow To Manage Yum Repositories
How To Manage Yum Repositories
 
How To Yum Package Installation
How To Yum Package InstallationHow To Yum Package Installation
How To Yum Package Installation
 
How To Manage Yum History
How To Manage Yum HistoryHow To Manage Yum History
How To Manage Yum History
 

Similar to Office 365 Useradmin with PowerShell

SPSVienna Office 365 Tenant to Tenant Migration - a complete Survial Guide
SPSVienna Office 365 Tenant to Tenant Migration - a complete Survial GuideSPSVienna Office 365 Tenant to Tenant Migration - a complete Survial Guide
SPSVienna Office 365 Tenant to Tenant Migration - a complete Survial GuideStephan Bisser
 
SharePoint 2013 in a hybrid world
SharePoint 2013 in a hybrid worldSharePoint 2013 in a hybrid world
SharePoint 2013 in a hybrid worldJethro Seghers
 
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...Toni Frankola
 
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...spsnyc
 
Webinar: Deploy Microsoft Teams and stay in control
Webinar: Deploy Microsoft Teams and stay in controlWebinar: Deploy Microsoft Teams and stay in control
Webinar: Deploy Microsoft Teams and stay in controlShareGate
 
Office365 user admin_w_powershell
Office365 user admin_w_powershellOffice365 user admin_w_powershell
Office365 user admin_w_powershellThorbjørn Værp
 
Share point 2013 in a hybrid world
Share point 2013 in a hybrid worldShare point 2013 in a hybrid world
Share point 2013 in a hybrid worldJethro Seghers
 
The top 10 things I wish I had known about O365 groups
The top 10 things I wish I had known about O365 groupsThe top 10 things I wish I had known about O365 groups
The top 10 things I wish I had known about O365 groupsAdam Ochs
 
Azure integration in dynamic crm
Azure integration in dynamic crmAzure integration in dynamic crm
Azure integration in dynamic crmssuser93127c1
 
SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...
SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...
SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...BIWUG
 
Windays14 - How to (remote) control Office 365 with Azure
Windays14 - How to (remote) control Office 365 with AzureWindays14 - How to (remote) control Office 365 with Azure
Windays14 - How to (remote) control Office 365 with Azureatwork
 
Overcoming the challenges of Office 365 user management in hybrid environments​
Overcoming the challenges of Office 365 user management in hybrid environments​Overcoming the challenges of Office 365 user management in hybrid environments​
Overcoming the challenges of Office 365 user management in hybrid environments​Zoho Corporation
 
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...Anna Loughnan Colquhoun
 
Azure DevOps Tasks.pptx
 Azure DevOps Tasks.pptx Azure DevOps Tasks.pptx
Azure DevOps Tasks.pptxPrasanthOneness
 
Microsoft 365 Audit Log Reports - M365 Learning Document
Microsoft 365 Audit Log Reports - M365 Learning DocumentMicrosoft 365 Audit Log Reports - M365 Learning Document
Microsoft 365 Audit Log Reports - M365 Learning DocumentLearning SharePoint
 
Office Add-ins community call-March 2019
Office Add-ins community call-March 2019Office Add-ins community call-March 2019
Office Add-ins community call-March 2019Microsoft 365 Developer
 
SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1
SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1
SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1Knut Relbe-Moe [MVP, MCT]
 
Office365 groups from the ground up - SPTechCon Boston
Office365 groups from the ground up - SPTechCon BostonOffice365 groups from the ground up - SPTechCon Boston
Office365 groups from the ground up - SPTechCon BostonDrew Madelung
 

Similar to Office 365 Useradmin with PowerShell (20)

SPSVienna Office 365 Tenant to Tenant Migration - a complete Survial Guide
SPSVienna Office 365 Tenant to Tenant Migration - a complete Survial GuideSPSVienna Office 365 Tenant to Tenant Migration - a complete Survial Guide
SPSVienna Office 365 Tenant to Tenant Migration - a complete Survial Guide
 
SharePoint 2013 in a hybrid world
SharePoint 2013 in a hybrid worldSharePoint 2013 in a hybrid world
SharePoint 2013 in a hybrid world
 
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
 
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
Governance in the Modern Workplace: SharePoint, OneDrive, Groups, Teams, Flow...
 
Webinar: Deploy Microsoft Teams and stay in control
Webinar: Deploy Microsoft Teams and stay in controlWebinar: Deploy Microsoft Teams and stay in control
Webinar: Deploy Microsoft Teams and stay in control
 
Office365 user admin_w_powershell
Office365 user admin_w_powershellOffice365 user admin_w_powershell
Office365 user admin_w_powershell
 
1. Managing Office 365 Identities and Services
1. Managing Office 365 Identities and Services1. Managing Office 365 Identities and Services
1. Managing Office 365 Identities and Services
 
Share point 2013 in a hybrid world
Share point 2013 in a hybrid worldShare point 2013 in a hybrid world
Share point 2013 in a hybrid world
 
The top 10 things I wish I had known about O365 groups
The top 10 things I wish I had known about O365 groupsThe top 10 things I wish I had known about O365 groups
The top 10 things I wish I had known about O365 groups
 
Azure integration in dynamic crm
Azure integration in dynamic crmAzure integration in dynamic crm
Azure integration in dynamic crm
 
SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...
SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...
SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...
 
slides
slidesslides
slides
 
Windays14 - How to (remote) control Office 365 with Azure
Windays14 - How to (remote) control Office 365 with AzureWindays14 - How to (remote) control Office 365 with Azure
Windays14 - How to (remote) control Office 365 with Azure
 
Overcoming the challenges of Office 365 user management in hybrid environments​
Overcoming the challenges of Office 365 user management in hybrid environments​Overcoming the challenges of Office 365 user management in hybrid environments​
Overcoming the challenges of Office 365 user management in hybrid environments​
 
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
 
Azure DevOps Tasks.pptx
 Azure DevOps Tasks.pptx Azure DevOps Tasks.pptx
Azure DevOps Tasks.pptx
 
Microsoft 365 Audit Log Reports - M365 Learning Document
Microsoft 365 Audit Log Reports - M365 Learning DocumentMicrosoft 365 Audit Log Reports - M365 Learning Document
Microsoft 365 Audit Log Reports - M365 Learning Document
 
Office Add-ins community call-March 2019
Office Add-ins community call-March 2019Office Add-ins community call-March 2019
Office Add-ins community call-March 2019
 
SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1
SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1
SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1
 
Office365 groups from the ground up - SPTechCon Boston
Office365 groups from the ground up - SPTechCon BostonOffice365 groups from the ground up - SPTechCon Boston
Office365 groups from the ground up - SPTechCon Boston
 

More from Thorbjørn Værp

Lag ditt eget Viva Learning innhold
Lag ditt eget Viva Learning innholdLag ditt eget Viva Learning innhold
Lag ditt eget Viva Learning innholdThorbjørn Værp
 
Frokostseminar 25.november 2020
Frokostseminar 25.november 2020Frokostseminar 25.november 2020
Frokostseminar 25.november 2020Thorbjørn Værp
 
Office 365 UGA Siste nytt september 2020
Office 365 UGA Siste nytt september 2020Office 365 UGA Siste nytt september 2020
Office 365 UGA Siste nytt september 2020Thorbjørn Værp
 
Office 365 User Group Agder Meetup January 2020
Office 365 User Group Agder Meetup January 2020Office 365 User Group Agder Meetup January 2020
Office 365 User Group Agder Meetup January 2020Thorbjørn Værp
 
Office365 User Group Agder Meetup mai 2019
Office365 User Group Agder Meetup mai 2019Office365 User Group Agder Meetup mai 2019
Office365 User Group Agder Meetup mai 2019Thorbjørn Værp
 
SPS Leicester 2018 hub sites
SPS Leicester 2018 hub sitesSPS Leicester 2018 hub sites
SPS Leicester 2018 hub sitesThorbjørn Værp
 
SharePoint hub sites in Office 365
SharePoint hub sites in Office 365SharePoint hub sites in Office 365
SharePoint hub sites in Office 365Thorbjørn Værp
 
Office 365 User Group Agder Meetup Mai 2018
Office 365 User Group Agder Meetup Mai 2018Office 365 User Group Agder Meetup Mai 2018
Office 365 User Group Agder Meetup Mai 2018Thorbjørn Værp
 
Office 365 User Groupa Agder - Siste nytt februar 2018
Office 365 User Groupa Agder - Siste nytt februar 2018Office 365 User Groupa Agder - Siste nytt februar 2018
Office 365 User Groupa Agder - Siste nytt februar 2018Thorbjørn Værp
 
Microsoft Teams & nyheter Januar 2018
Microsoft Teams & nyheter Januar 2018Microsoft Teams & nyheter Januar 2018
Microsoft Teams & nyheter Januar 2018Thorbjørn Værp
 
GDPR presentation Tomas Sunde NCG
GDPR presentation Tomas Sunde NCGGDPR presentation Tomas Sunde NCG
GDPR presentation Tomas Sunde NCGThorbjørn Værp
 
O365 UGA - Siste nytt November
O365 UGA - Siste nytt NovemberO365 UGA - Siste nytt November
O365 UGA - Siste nytt NovemberThorbjørn Værp
 
Team Me Up Scotty SPSOslo w.Extending
Team Me Up Scotty SPSOslo w.ExtendingTeam Me Up Scotty SPSOslo w.Extending
Team Me Up Scotty SPSOslo w.ExtendingThorbjørn Værp
 
Team Me Up with Microsoft Teams
Team Me Up with Microsoft TeamsTeam Me Up with Microsoft Teams
Team Me Up with Microsoft TeamsThorbjørn Værp
 
SPSMilano - Microsoft Teams
SPSMilano - Microsoft TeamsSPSMilano - Microsoft Teams
SPSMilano - Microsoft TeamsThorbjørn Værp
 
O365 UserGroup Agder meetup march
O365 UserGroup Agder meetup marchO365 UserGroup Agder meetup march
O365 UserGroup Agder meetup marchThorbjørn Værp
 

More from Thorbjørn Værp (20)

Lag ditt eget Viva Learning innhold
Lag ditt eget Viva Learning innholdLag ditt eget Viva Learning innhold
Lag ditt eget Viva Learning innhold
 
Frokostseminar 25.november 2020
Frokostseminar 25.november 2020Frokostseminar 25.november 2020
Frokostseminar 25.november 2020
 
Office 365 UGA Siste nytt september 2020
Office 365 UGA Siste nytt september 2020Office 365 UGA Siste nytt september 2020
Office 365 UGA Siste nytt september 2020
 
Office 365 User Group Agder Meetup January 2020
Office 365 User Group Agder Meetup January 2020Office 365 User Group Agder Meetup January 2020
Office 365 User Group Agder Meetup January 2020
 
Office365 User Group Agder Meetup mai 2019
Office365 User Group Agder Meetup mai 2019Office365 User Group Agder Meetup mai 2019
Office365 User Group Agder Meetup mai 2019
 
SPS Leicester 2018 hub sites
SPS Leicester 2018 hub sitesSPS Leicester 2018 hub sites
SPS Leicester 2018 hub sites
 
SPS Milan 2018 hub sites
SPS Milan 2018 hub sitesSPS Milan 2018 hub sites
SPS Milan 2018 hub sites
 
SharePoint hub sites in Office 365
SharePoint hub sites in Office 365SharePoint hub sites in Office 365
SharePoint hub sites in Office 365
 
Office 365 User Group Agder Meetup Mai 2018
Office 365 User Group Agder Meetup Mai 2018Office 365 User Group Agder Meetup Mai 2018
Office 365 User Group Agder Meetup Mai 2018
 
Office 365 User Groupa Agder - Siste nytt februar 2018
Office 365 User Groupa Agder - Siste nytt februar 2018Office 365 User Groupa Agder - Siste nytt februar 2018
Office 365 User Groupa Agder - Siste nytt februar 2018
 
Microsoft Teams & nyheter Januar 2018
Microsoft Teams & nyheter Januar 2018Microsoft Teams & nyheter Januar 2018
Microsoft Teams & nyheter Januar 2018
 
GDPR presentation Tomas Sunde NCG
GDPR presentation Tomas Sunde NCGGDPR presentation Tomas Sunde NCG
GDPR presentation Tomas Sunde NCG
 
O365 UGA - Siste nytt November
O365 UGA - Siste nytt NovemberO365 UGA - Siste nytt November
O365 UGA - Siste nytt November
 
Team Me Up Scotty SPSOslo w.Extending
Team Me Up Scotty SPSOslo w.ExtendingTeam Me Up Scotty SPSOslo w.Extending
Team Me Up Scotty SPSOslo w.Extending
 
OCAD løypelegging
OCAD løypeleggingOCAD løypelegging
OCAD løypelegging
 
Team Me Up with Microsoft Teams
Team Me Up with Microsoft TeamsTeam Me Up with Microsoft Teams
Team Me Up with Microsoft Teams
 
SPSMilano - Microsoft Teams
SPSMilano - Microsoft TeamsSPSMilano - Microsoft Teams
SPSMilano - Microsoft Teams
 
Team me up Scotty!
Team me up Scotty!Team me up Scotty!
Team me up Scotty!
 
Team me up scotty!
Team me up scotty!Team me up scotty!
Team me up scotty!
 
O365 UserGroup Agder meetup march
O365 UserGroup Agder meetup marchO365 UserGroup Agder meetup march
O365 UserGroup Agder meetup march
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Office 365 Useradmin with PowerShell

  • 1.
  • 2. Thanks to the Sponsors!
  • 3. • Thorbjørn Værp • Principal Consultant | • Kristiansand Norway • @vaerpn | tv@pointtaken.no • http://sharepoint13.org #SPSLONDON About me
  • 8. #SPSLONDON AGENDA • 4 steps to setup O365 PS Environment
  • 9. #SPSLONDON AGENDA • 4 steps to setup O365 PS Environment • Foreach-object | CSV Import Users to O365
  • 10. #SPSLONDON AGENDA • 4 steps to setup O365 PS Environment • Foreach-object | CSV Import Users to O365 • Advanced O365 UserManagement
  • 12. 4 steps to setup O365 PS Environment • Step 1 - Install some binaries • Step 2 - Load some modules • Step 3 - Connect to something in Office 365 • Step 4 - Use [aka Copy with Pride] #SPSLONDON
  • 13. Step1 Install some binaries • http://go.microsoft.com/fwlink/?LinkID=286152 #SPSLONDON
  • 15. Step 1 – Azure AD PS Module Version release • http://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version- release-history.aspx #SPSLONDON
  • 18. Step 1 – Install SPO Management Shell • https://www.microsoft.com/en-us/download/details.aspx?id=35588 #SPSLONDON
  • 20. 1 – Install Skype for Business Online #SPSLONDON • https://www.microsoft.com/en-us/download/details.aspx?id=39366
  • 23. 2 - Load some modules #SPSLONDON Create the ISE profile if (!(test-path $profile )) {new-item -type file -path $profile -force}
  • 24. 2 Load some modules – Connect to all #SPSLONDON https://technet.microsoft.com/en-us/library/dn568015.aspx
  • 25. 2 Load some modules – Verify #SPSLONDON Get-Module | Select-Object Name, Path | FL
  • 26. 3. Connect to something –> Office 365 /AAD #SPSLONDON
  • 27. 3 Connect to -> SPO #SPSLONDON
  • 28. 3 Connect to -> Exchange #SPSLONDON Remember to Disconnect!
  • 29. 3 Connect to -> Skype #SPSLONDON
  • 30. 4 Use it • Notepad ++, or Visual Studio #SPSLONDON
  • 31. 4 Use it -> MSDN https://msdn.microsoft.com/en-us/powershell/mt173057.aspx
  • 32. 4 Use it -> SP Command Builder https://www.microsoft.com/resources/TechNet/en- us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html #SPSLONDON
  • 33. 4 Use it ->Script Center #SPSLONDON https://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Val ue=Office365
  • 34. 4 Use it ->Disclaimer #SPSLONDON No Animals was harmed during the making of these scipts!  Feel free to Copy with Pride any script you might find usefull, but it’s all at your own risk! I encourage you to test thoroughly on a test/dev O365 tenant. @vaerpn
  • 35. 4 steps to setup O365 PS Environment • Step 1 - Install some binaries • Step 2 - Load some modules • Step 3 - Connect to something in Office 365 • Step 4 - Use [aka Copy with Pride] #SPSLONDON
  • 37. #SPSLONDON AGENDA • 4 steps to setup O365 PS Environment • Foreach-object | CSV Import Users to O365 • Advanced O365 UserManagement
  • 38. #SPSLONDON AGENDA • 4 steps to setup O365 PS Environment • Foreach-object | CSV Import Users to O365 • Advanced O365 UserManagement
  • 39. Foreach-object| CSV Import Users to O365 #SPSLONDON Step1: Create a nice Excel file
  • 40. HowTo: CSV Import Users to O365 #SPSLONDON Save it as Comma delimeted .csv when you need to run it
  • 41. HowTo: CSV Import Users to O365 #SPSLONDON Open in Notepad ++
  • 42. HowTo: CSV Import Users to O365 #SPSLONDON Open in Notepad ++, Replace ; with , [Ctrl+H] and set Encoding to UTF-8
  • 43. HowTo: CSV Import Users to O365 #SPSLONDON Much better 
  • 44. HowTo: CSV Import Users to O365 #SPSLONDON Import-CSV foreach-object
  • 45. HowTo: CSV Import Users to O365 #SPSLONDON Import-CSV Path | Foreach-object
  • 46. HowTo: CSV Import Users to O365 #SPSLONDON Filter columns in Excel
  • 48. #SPSLONDON AGENDA • 4 steps to setup O365 PS Environment • Foreach-object | CSV Import Users to O365 • Advanced O365 UserManagement
  • 49. #SPSLONDON AGENDA • 4 steps to setup O365 PS Environment • Foreach-object | CSV Import Users to O365 • Advanced O365 UserManagement
  • 50. Advanced O365 Useradmin #SPSLONDON No Animals was harmed during the making of these scipts!  Feel free to Copy with Pride any script you might find usefull, but it’s all at your own risk! I encourage you to test thoroughly on a test/dev O365 tenant. @vaerpn >DISCLAIMER
  • 51. Advanced O365 Useradmin >License O365 w ADUC Groups #SPSLONDON Scenario: You have a new Employee, the IT-Dep add Him/Her to Active Directory Users, include Security Groups and mail enables Him/Her. Then AAD Connect synchronize all new user objects evry 30 minutes. Then, after the sync the IT-Dept log on to the O365 tenant and assign the new users a license E5/E37E1. Challenge with this: It’s manuel steps Two repositories for license assignment, lack of reporting Free up licenses
  • 52. Advanced O365 Useradmin >License O365 w ADUC Groups #SPSLONDON Sollution: Create a PowerShell script that adds/modifies user licenses based upon lokal AD Group membership. Automate the script by the use of Scheduled Tasks, or create a service. All reporting are done in ADUC The User that runs this script is a Domain Admin in AD and Global Admin in O365
  • 53. Advanced O365 Useradmin >License O365 w ADUC Groups #SPSLONDON XML file:
  • 54. Advanced O365 Useradmin >License O365 w ADUC Groups #SPSLONDON XML file:
  • 55. Advanced O365 Useradmin >License O365 w ADUC Groups #SPSLONDON If I show my script to a Dev person what is the reaction?
  • 56. Advanced O365 Useradmin >License O365 w ADUC Groups #SPSLONDON
  • 58. Advanced O365 Useradmin >Get-MSoluser #SPSLONDON Get-MsolUser Cmdlet and Properties Get-MsolUser cmdlet supports a number of user properties. Properties that I use in my daily operational tasks are explained in the table below. The below table does not list all the properties supported by the Get- MsolUser cmdlet, but the common user properties that you might find useful.
  • 59. Advanced O365 Useradmin >Get-MSoluser #SPSLONDON Get-MsolUser Cmdlet and Properties Property When to use Property AlternateEmailAddresses Displays the alternate email address assigned to an Office 365 user. Department As the property name suggests. DisplayName Display Name of the user. This property is required when creating a new user in Office 365. IsLicensed Returns TRUE if user is licensed for any Office 365 Plans and FALSE if not licensed. LastDirSyncTime If you have users synced from On-premises Active Directory, use this property to get the last date and time of the synchronization. In other words, use this property if you are using “Synchronized Identity” deployment approach and you want to know the last synchronization status of a user. LastPasswordChangeTimestamp Use this property to get date and time of the last password changed for Office 365 users. LicenseReconciliationNeeded Whether or not the user currently has a mailbox without an Office 365 license. I will explain more about this property in next part of this article series. Licenses This is a multi-valued property. It contains the Office 365 licenses assigned to the user. I will explain more about Licenses property later in this article series. LiveId This is the user’s unique ID to log on to Office 365. MobilePhone As the name suggests. OverallProvisioningStatus Whether or not the user has been provisioned for Office 365 services. PasswordNeverExpires Use this property to see if the user is forced to change password every 90 days StrongPasswordRequired Returns True or False. True indicates that the user is required to set the strong password when they change their password next time. UsageLocation This is a two letter Country code and must be set in order to assign Office 365 Licenses. So it is fairly simple to understand that an Office 365 user must be assigned with a UsageLocation before the user can use the Office 365 services. UserPrincipalName As the name suggests. WhenCreated The creation date of the user.
  • 60. Advanced O365 Useradmin >Get-MSoluser #SPSLONDON Get-MsolUser cmdlet Parameters Get-MsolUser cmdlet supports various parameters that you can use to get a specific type of information for Office 365 users. For example, by using “–EnabledFilter” parameter you can return users that are enabled or disabled. Similarly, you can use “-HasErrorsOnly” parameter to return users that have validation errors. I have compiled a list of Get-MsolUser parameters with examples in the table below:
  • 61. Advanced O365 Useradmin >Get-MSoluser #SPSLONDON Get-MsolUser cmdlet Parameters Parameter When to use Example -EnabledFilter Use –EnabledFilter parameter to get a list of users that are enabled or disabled. You can use EnabledOnly or DisabledOnly values with –EnabledFilter parameter. Get-MsolUser –All –EnabledFilter DisabledOnly Get-MsolUser –All –EnabledFilter EnabledOnly -DomainName Use –DomainName parameter to get results for a specific Office 365 domain. Get-MsolUser –All –DomainName <DomainName> - ReturnDeletedUs ers Use –ReturnDeletedUsers parameter to get a list of users that were deleted from Office 365, but are still present in the Ofice 365 Recycle bin. Get-MsolUser –ReturnDeletedUsers -SearchString Use –SearchString parameter to search users across Office 365 Tenant. Get-MsolUser –All –SearchString Dean Above command returns only users with an email address or display name staring with the “Dean” string. -Synchronized Use –Synchronized parameter if you need to return a list of users that are synchronized from On-Premises Active Directory. Get-MsolUser –All –Synchronized - UnlicensedUsers Only Use –UnlicensedUsersOnly if you wish to see a list of users that are associated with an Office 365 license. Get-MsolUser –All –UnlicensedUsersOnly -MaxResults OR - All By default Get-MsolUser returns 500 results in a command. Use –All parameter to return all results. You can use either –MaxResults or –All parameter. Get-MsolUser –All –UnlicensedUsersOnly Get-MsolUser –MaxResults 2000 –UnlicensedUsersOnly
  • 63. Advanced O365 Useradmin >More #SPSLONDON Get-LastLogonStats.ps1 by Alan Byrne: https://gallery.technet.microsoft.com/scriptcenter/E xport-Office-365-User-7fc0b73f Disable-ClutterOnByDefault.ps1 by Matt mc Nabb: https://gallery.technet.microsoft.com/scriptcenter/D isable-Clutters-For-All-41834444
  • 65. #SPSLONDON AGENDA • 4 steps to setup O365 PS Environment • Foreach-object | CSV Import Users to O365 • Advanced O365 UserManagement
  • 66. Questions ????? @vaerpn | tv@pointtaken.no #SPSLONDON Thank You!

Editor's Notes

  1. This is version 7 X from 2014, It’s the newest one as far as I know. Search MS Download and sort by date.
  2. How can I determine what version of AAD PowerShell I have? You can run the get-item cmdlet to check the version of the DLL files of the module that you have currently installed: (get-item C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MSOnline\Microsoft.Online.Administration.Automation.PSModule.dll).VersionInfo.FileVersion
  3. Create the ISE profile if (!(test-path $profile )) {new-item -type file -path $profile -force} Import modules Set-ExecutionPolicy unrestricted (or remote signed)