Managing SharePoint Online

by May 20, 2020

Categories

Tags

Administration agent-based monitoring Agentless Monitoring alert responses alert thresholds alerting Alerts Amazon Aurora Amazon EC2 Amazon RDS Amazon RDS / Aurora Amazon RDS for SQL Server Amazon Redshift Amazon S3 Amazon Web Services (AWS) Analytics application monitoring Aqua Data Studio automation availability Azure Azure SQL Database azure sql managed instance Azure VM backup Backup and recovery backup and restore backup compression backup status Backup Strategy backups big data Blocking bug fixes business architecture business data objects business intelligence business process modeling business process models capacity planning change management cloud cloud database cloud database monitoring cloud infrastructure cloud migration cloud providers Cloud Readiness Cloud Services cloud storage cloud virtual machine cloud VM clusters code completion collaboration compliance compliance audit compliance audits compliance manager compliance reporting conference configuration connect to database cpu Cross Platform custom counters Custom Views customer survey customer testimonials Dark Theme dashboards data analysis Data Analytics data architect data architecture data breaches Data Collector data governance data lakes data lineage data management data model data modeler data modeling data models data privacy data protection data security data security measures data sources data visualization data warehouse database database administration database administrator database automation database backup database backups database capacity database changes database community database connection database design database developer database developers database development database diversity Database Engine Tuning Advisor database fragmentation database GUI database IDE database indexes database inventory management database locks database management database migration database monitoring database navigation database optimization database performance Database Permissions database platforms database profiling database queries database recovery database replication database restore database schema database security database support database synchronization database tools database transactions database tuning database-as-a-service databases DB Change Manager DB Optimizer DB PowerStudio DB2 DBA DBaaS DBArtisan dBase DBMS DDL Debugging defragmentation Demo diagnostic manager diagnostics dimensional modeling disaster recovery Download drills embedded database Encryption End-user Experience entity-relationship model ER/Studio ER/Studio Data Architect ER/Studio Enterprise Team Edition events execution plans free tools galera cluster GDPR Getting Started Git GitHub Google Cloud Hadoop Healthcare high availability HIPAA Hive hybrid clouds Hyper-V IDERA IDERA ACE Index Analyzer index optimization infrastructure as a service (IaaS) infrastructure monitoring installation Integrated Development Environment interbase Inventory Manager IT infrastructure Java JD Edwards JSON licensing load test load testing logical data model macOS macros managed cloud database managed cloud databases MariaDB memory memorystorage memoryusage metadata metric baselines metric thresholds Microsoft Azure Microsoft Azure SQL Database Microsoft PowerShell Microsoft SQL Server Microsoft Windows MongoDB monitoring Monitoring Tools Monyog multiple platforms MySQL news newsletter NoSQL Notifications odbc optimization Oracle PeopleSoft performance Performance Dashboards performance metrics performance monitoring performance schema performance tuning personally identifiable information physical data model Platform platform as a service (PaaS) PostgreSQL Precise Precise for Databases Precise for Oracle Precise for SQL Server Precise Management Database (PMDB) product updates Project Migration public clouds Query Analyzer query builder query monitor query optimization query performance Query Store query tool query tuning query-level waits Rapid SQL rdbms real time monitoring Real User Monitoring recovery regulations relational databases Releases Reporting Reports repository Restore reverse engineering Roadmap sample SAP Scalability Security Policy Security Practices server monitoring Server performance server-level waits Service Level Agreement SkySQL slow query SNMP snowflake source control SQL SQL Admin Toolset SQL CM SQL code SQL coding SQL Compliance Manager SQL Defrag Manager sql development SQL Diagnostic Manager SQL Diagnostic Manager for MySQL SQL Diagnostic Manager for SQL Server SQL Diagnostic Manager Pro SQL DM SQL Doctor SQL Enterprise Job Manager SQl IM SQL Inventory Manager SQL Management Suite SQL Monitoring SQL Performance SQL Quality SQL query SQL Query Tuner SQL Safe Backup SQL script SQL Secure SQL Security Suite SQL Server sql server alert SQL Server Migration SQL Server Performance SQL Server Recommendations SQL Server Security SQL statement history SQL tuning SQL Virtual Database sqlmemory sqlserver SQLyog Storage Storage Performance structured data Subversion Support tempdb tempdb data temporal data Tips and Tricks troubleshooting universal data models universal mapping unstructured data Uptime Infrastructure Monitor user experience user permissions Virtual Machine (VM) web services webinar What-if analysis WindowsPowerShell

If you use SharePoint Online and would like to manage it via PowerShell, download and install the Microsoft.Online.SharePoint.PowerShell module from the PowerShell Gallery:

 
# search for the module in PowerShell Gallery (optional)
PS> Find-Module -Name Microsoft.Online.SharePoint.PowerShell

Version              Name                                Repository           Description 
-------              ----                                ----------           --------
16.0.19927.12000     Microsoft.Online.SharePoint.Powe... PSGallery            Microsoft SharePoint Online
 
# install the module in your personal scope (no admin privileges required)
PS> Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Repository PSGallery -Scope CurrentUser

Now you can use a wealth of new PowerShell cmdlets to manage SharePoint Online:

 
PS> Get-Command -Module Microsoft.Online.SharePoint.PowerShell | Format-Wide -Column 3


Add-SPOGeoAdministrator    Add-SPOHubSiteAssociation  Add-SPOHubToHubAssocia...
Add-SPOOrgAssetsLibrary    Add-SPOSiteCollectionAp... Add-SPOSiteDesign        
Add-SPOSiteDesignTask      Add-SPOSiteScript          Add-SPOSiteScriptPackage 
Add-SPOTenantCdnOrigin     Add-SPOTheme               Add-SPOUser              
Approve-SPOTenantServic... Approve-SPOTenantServic... Connect-SPOService       
ConvertTo-SPOMigrationE... ConvertTo-SPOMigrationT... Deny-SPOTenantServiceP...
Disable-SPOTenantServic... Disconnect-SPOService      Enable-SPOCommSite       
Enable-SPOTenantService... Export-SPOQueryLogs        Export-SPOUserInfo       
Export-SPOUserProfile      Get-SPOAppErrors           Get-SPOAppInfo           
Get-SPOBrowserIdleSignOut  Get-SPOBuiltInDesignPac... Get-SPOCrossGeoMovedUsers
Get-SPOCrossGeoMoveReport  Get-SPOCrossGeoUsers       Get-SPODataEncryptionP...
Get-SPODeletedSite         Get-SPOExternalUser        Get-SPOGeoAdministrator  
Get-SPOGeoMoveCrossComp... Get-SPOGeoStorageQuota     Get-SPOHideDefaultThemes 
Get-SPOHomeSite            Get-SPOHubSite             Get-SPOKnowledgeHubSite  
Get-SPOMigrationJobProg... Get-SPOMigrationJobStatus  Get-SPOMultiGeoCompany...
Get-SPOMultiGeoExperience  Get-SPOOrgAssetsLibrary    Get-SPOOrgNewsSite       
Get-SPOPublicCdnOrigins    Get-SPOSite                Get-SPOSiteCollectionA...
Get-SPOSiteContentMoveS... Get-SPOSiteDataEncrypti... Get-SPOSiteDesign        
Get-SPOSiteDesignRights    Get-SPOSiteDesignRun       Get-SPOSiteDesignRunSt...
Get-SPOSiteDesignTask      Get-SPOSiteGroup           Get-SPOSiteRenameState   
Get-SPOSiteScript          Get-SPOSiteScriptFromList  Get-SPOSiteScriptFromWeb 
Get-SPOSiteUserInvitations Get-SPOStorageEntity       Get-SPOStructuralNavig...
Get-SPOStructuralNaviga... Get-SPOTenant              Get-SPOTenantCdnEnabled  
Get-SPOTenantCdnOrigins    Get-SPOTenantCdnPolicies   Get-SPOTenantContentTy...
Get-SPOTenantLogEntry      Get-SPOTenantLogLastAva... Get-SPOTenantOrgRelation 
Get-SPOTenantOrgRelatio... Get-SPOTenantOrgRelatio... Get-SPOTenantServicePr...
Get-SPOTenantServicePri... Get-SPOTenantSyncClient... Get-SPOTenantTaxonomyR...
Get-SPOTheme               Get-SPOUnifiedGroup        Get-SPOUnifiedGroupMov...
Get-SPOUser                Get-SPOUserAndContentMo... Get-SPOUserOneDriveLoc...
Get-SPOWebTemplate         Grant-SPOHubSiteRights     Grant-SPOSiteDesignRights
Invoke-SPOMigrationEncr... Invoke-SPOSiteDesign       Invoke-SPOSiteSwap       
New-SPOMigrationEncrypt... New-SPOMigrationPackage    New-SPOPublicCdnOrigin   
New-SPOSdnProvider         New-SPOSite                New-SPOSiteGroup         
New-SPOTenantOrgRelation   Register-SPODataEncrypt... Register-SPOHubSite      
Remove-SPODeletedSite      Remove-SPOExternalUser     Remove-SPOGeoAdministr...
Remove-SPOHomeSite         Remove-SPOHubSiteAssoci... Remove-SPOHubToHubAsso...
Remove-SPOKnowledgeHubSite Remove-SPOMigrationJob     Remove-SPOMultiGeoComp...
Remove-SPOOrgAssetsLibrary Remove-SPOOrgNewsSite      Remove-SPOPublicCdnOrigin
Remove-SPOSdnProvider      Remove-SPOSite             Remove-SPOSiteCollecti...
Remove-SPOSiteCollectio... Remove-SPOSiteDesign       Remove-SPOSiteDesignTask 
Remove-SPOSiteGroup        Remove-SPOSiteScript       Remove-SPOSiteUserInvi...
Remove-SPOStorageEntity    Remove-SPOTenantCdnOrigin  Remove-SPOTenantOrgRel...
Remove-SPOTenantSyncCli... Remove-SPOTheme            Remove-SPOUser           
Remove-SPOUserInfo         Remove-SPOUserProfile      Repair-SPOSite           
Request-SPOPersonalSite    Request-SPOUpgradeEvalu... Restore-SPODataEncrypt...
Restore-SPODeletedSite     Revoke-SPOHubSiteRights    Revoke-SPOSiteDesignRi...
Revoke-SPOTenantService... Revoke-SPOUserSession      Set-SPOBrowserIdleSignOut
Set-SPOBuiltInDesignPac... Set-SPOGeoStorageQuota     Set-SPOHideDefaultThemes 
Set-SPOHomeSite            Set-SPOHubSite             Set-SPOKnowledgeHubSite  
Set-SPOMigrationPackage... Set-SPOMultiGeoCompanyA... Set-SPOMultiGeoExperience
Set-SPOOrgAssetsLibrary    Set-SPOOrgNewsSite         Set-SPOSite              
Set-SPOSiteDesign          Set-SPOSiteGroup           Set-SPOSiteOffice365Group
Set-SPOSiteScript          Set-SPOSiteScriptPackage   Set-SPOStorageEntity     
Set-SPOStructuralNaviga... Set-SPOStructuralNaviga... Set-SPOTenant            
Set-SPOTenantCdnEnabled    Set-SPOTenantCdnPolicy     Set-SPOTenantContentTy...
Set-SPOTenantSyncClient... Set-SPOTenantTaxonomyRe... Set-SPOUnifiedGroup      
Set-SPOUser                Set-SPOWebTheme            Start-SPOSiteContentMove 
Start-SPOSiteRename        Start-SPOUnifiedGroupMove  Start-SPOUserAndConten...
Stop-SPOSiteContentMove    Stop-SPOUserAndContentMove Submit-SPOMigrationJob   
Test-SPOSite               Unregister-SPOHubSite      Update-SPODataEncrypti...
Update-UserType            Upgrade-SPOSite            Verify-SPOTenantOrgRel...  
 

Start by looking up Connect-SPOService which is always the first step and connects you to your SharePoint Online:

 
Get-Help -Name Connect-SPOService -ShowWindow    
 

Next, test-drive the cmdlets with the Get verb; they safely provide you with tons of information but won’t change any setting or have the potential to damage anything:

 
PS> Get-Command -Verb Get -Module Microsoft.Online.SharePoint.PowerShell | Format-Wide -Column 3


Get-SPOAppErrors            Get-SPOAppInfo              Get-SPOBrowserIdleSignOut 
Get-SPOBuiltInDesignPack... Get-SPOCrossGeoMovedUsers   Get-SPOCrossGeoMoveReport 
Get-SPOCrossGeoUsers        Get-SPODataEncryptionPolicy Get-SPODeletedSite        
Get-SPOExternalUser         Get-SPOGeoAdministrator     Get-SPOGeoMoveCrossComp...
Get-SPOGeoStorageQuota      Get-SPOHideDefaultThemes    Get-SPOHomeSite           
Get-SPOHubSite              Get-SPOKnowledgeHubSite     Get-SPOMigrationJobProg...
Get-SPOMigrationJobStatus   Get-SPOMultiGeoCompanyAl... Get-SPOMultiGeoExperience 
Get-SPOOrgAssetsLibrary     Get-SPOOrgNewsSite          Get-SPOPublicCdnOrigins   
Get-SPOSite                 Get-SPOSiteCollectionApp... Get-SPOSiteContentMoveS...
Get-SPOSiteDataEncryptio... Get-SPOSiteDesign           Get-SPOSiteDesignRights   
Get-SPOSiteDesignRun        Get-SPOSiteDesignRunStatus  Get-SPOSiteDesignTask     
Get-SPOSiteGroup            Get-SPOSiteRenameState      Get-SPOSiteScript         
Get-SPOSiteScriptFromList   Get-SPOSiteScriptFromWeb    Get-SPOSiteUserInvitations
Get-SPOStorageEntity        Get-SPOStructuralNavigat... Get-SPOStructuralNaviga...
Get-SPOTenant               Get-SPOTenantCdnEnabled     Get-SPOTenantCdnOrigins   
Get-SPOTenantCdnPolicies    Get-SPOTenantContentType... Get-SPOTenantLogEntry     
Get-SPOTenantLogLastAvai... Get-SPOTenantOrgRelation    Get-SPOTenantOrgRelatio...
Get-SPOTenantOrgRelation... Get-SPOTenantServicePrin... Get-SPOTenantServicePri...
Get-SPOTenantSyncClientR... Get-SPOTenantTaxonomyRep... Get-SPOTheme              
Get-SPOUnifiedGroup         Get-SPOUnifiedGroupMoveS... Get-SPOUser               
Get-SPOUserAndContentMov... Get-SPOUserOneDriveLocation Get-SPOWebTemplate   
 

Once you feel comfortable, you can take a look at the remaining cmdlets that support changing and administering SharePoint:

 
PS> Get-Command -Module Microsoft.Online.SharePoint.PowerShell | Group-Object Verb -NoElement | Sort-Object Count -Desc

Count Name                     
----- ----                     
   63 Get                      
   30 Set                      
   29 Remove                   
   12 Add                      
    7 New                      
    4 Start                    
    4 Revoke                   
    3 Export                   
    3 Invoke                   
    2 Update                   
    2 Stop                     
    2 Restore                  
    2 Request                  
    2 Register                 
    2 Grant                    
    2 Enable                   
    2 ConvertTo                
    2 Approve                  
    1 Repair                   
    1 Disconnect               
    1 Disable                  
    1 Deny                     
    1 Connect                  
    1 Submit                   
    1 Test                     
    1 Unregister               
    1 Upgrade                  
    1 Verify 
 


Twitter This Tip! ReTweet this Tip!