{"id":5421,"date":"2015-06-21T00:01:00","date_gmt":"2015-06-21T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2015\/06\/21\/weekend-scripter-start-powershell-scripting-for-office-365-sites\/"},"modified":"2019-02-18T09:47:21","modified_gmt":"2019-02-18T16:47:21","slug":"weekend-scripter-start-powershell-scripting-for-office-365-sites","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/weekend-scripter-start-powershell-scripting-for-office-365-sites\/","title":{"rendered":"Weekend Scripter: Start PowerShell Scripting for Office 365 Sites"},"content":{"rendered":"<p><strong style=\"font-size:12px\">Summary<\/strong><span style=\"font-size:12px\">: Guest blogger, Michael Blumenthal shows how to findWindows PowerShell cmdlets that are available for <\/span><span style=\"font-size:12px\">Office 365 sites<\/span><span style=\"font-size:12px\">.<\/span><\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. Today we have a new guest blogger, Michael Blumenthal, who we met in Chicago in May at Microsoft Ignite. Here is a little bit about Michael:<\/p>\n<p style=\"margin-left:30px\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/wes-6-21-15-1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/wes-6-21-15-1.png\" alt=\"Photo of Michael Blumenthal\" title=\"Photo of Michael Blumenthal\" \/><\/a><\/p>\n<p style=\"margin-left:30px\">Michael Blumenthal is a technical solution evangelist with <a href=\"http:\/\/www.psclistens.com\/\" target=\"_blank\">PSC Group <\/a>and a <a href=\"https:\/\/mvp.microsoft.com\/en-us\/mvp\/Michael%20Blumenthal-5001417\" target=\"_blank\" title=\"Michael's MVP Profile\">Microsoft Office 365&nbsp;MVP<\/a>. As such, he is an experienced architect for SharePoint, and business technology advisor. Michael has deep SharePoint expertise, with&nbsp;two decades of development, infrastructure, and administration experience. He&rsquo;s designed, implemented, and supported intranets, extranets, and Internet sites for clients in markets as diverse as banking, energy, government, and transportation.<\/p>\n<p style=\"margin-left:30px\">Michael holds numerous Microsoft certifications (including most of the SharePoint certifications) and the Certified Associate&nbsp;in Project Management (CAPM) from the Project Management Institute. He can be found year round speaking on technology topics, including SharePoint and Windows PowerShell, at Chicago-area technology events and user groups.<\/p>\n<p style=\"margin-left:30px\">Michael&#039;s contact info:<\/p>\n<p style=\"margin-left:60px\"><b>Blog<\/b>: <a href=\"http:\/\/michaelblumenthal.me\/\" target=\"_blank\">Michael Blumenthal, Office 365 MVP<\/a><br \/> <b>Twitter<\/b>: <a href=\"http:\/\/twiter.com\/michaelbl\">@michaelbl<\/a><\/p>\n<h2>You need Windows PowerShell 4.0<\/h2>\n<p>I assume you already have Windows PowerShell&nbsp;4.0 installed. You will want two cmdlet libraries:<\/p>\n<p>First, get the <a href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=35588\" target=\"_blank\">SharePoint Online Management Shell<\/a> and install it. This will give you&#8230;wait for it&hellip;<\/p>\n<p>37 SharePoint Online cmdlets.<\/p>\n<p>I counted them this way:<\/p>\n<p style=\"margin-left:30px\">get-command -Noun SPO* | where moduleName -like Microsoft.Online.SharePoint* | measure<\/p>\n<p>Thirty-seven? Yes, only 37! But in SharePoint 2013 on premise, I had hundreds of SharePoint cmdlets available to me. What on earth will I do?<\/p>\n<p>First, let&rsquo;s look at what these 37 are:<\/p>\n<p style=\"margin-left:30px\">PS C:\\Windows\\system32&gt; get-command -Noun SPO* | where moduleName -like Microsoft.Online.SharePoint* | <br \/>Select-Object Name | Sort-Object Name<\/p>\n<p style=\"margin-left:30px\">Name<\/p>\n<p style=\"margin-left:30px\">&#8212;-<\/p>\n<p style=\"margin-left:30px\">Add-SPOUser<\/p>\n<p style=\"margin-left:30px\">Connect-SPOService<\/p>\n<p style=\"margin-left:30px\">ConvertTo-SPOMigrationTargetedPackage<\/p>\n<p style=\"margin-left:30px\">Disconnect-SPOService<\/p>\n<p style=\"margin-left:30px\">Get-SPOAppErrors<\/p>\n<p style=\"margin-left:30px\">Get-SPOAppInfo<\/p>\n<p style=\"margin-left:30px\">Get-SPODeletedSite<\/p>\n<p style=\"margin-left:30px\">Get-SPOExternalUser<\/p>\n<p style=\"margin-left:30px\">Get-SPOSite<\/p>\n<p style=\"margin-left:30px\">Get-SPOSiteGroup<\/p>\n<p style=\"margin-left:30px\">Get-SPOTenant<\/p>\n<p style=\"margin-left:30px\">Get-SPOTenantLogEntry<\/p>\n<p style=\"margin-left:30px\">Get-SPOTenantLogLastAvailableTimeInUtc<\/p>\n<p style=\"margin-left:30px\">Get-SPOTenantSyncClientRestriction<\/p>\n<p style=\"margin-left:30px\">Get-SPOUser<\/p>\n<p style=\"margin-left:30px\">Get-SPOWebTemplate<\/p>\n<p style=\"margin-left:30px\">New-SPOMigrationPackage<\/p>\n<p style=\"margin-left:30px\">New-SPOSite<\/p>\n<p style=\"margin-left:30px\">New-SPOSiteGroup<\/p>\n<p style=\"margin-left:30px\">Remove-SPODeletedSite<\/p>\n<p style=\"margin-left:30px\">Remove-SPOExternalUser<\/p>\n<p style=\"margin-left:30px\">Remove-SPOSite<\/p>\n<p style=\"margin-left:30px\">Remove-SPOSiteGroup<\/p>\n<p style=\"margin-left:30px\">Remove-SPOTenantSyncClientRestriction<\/p>\n<p style=\"margin-left:30px\">Remove-SPOUser<\/p>\n<p style=\"margin-left:30px\">Repair-SPOSite<\/p>\n<p style=\"margin-left:30px\">Request-SPOPersonalSite<\/p>\n<p style=\"margin-left:30px\">Request-SPOUpgradeEvaluationSite<\/p>\n<p style=\"margin-left:30px\">Restore-SPODeletedSite<\/p>\n<p style=\"margin-left:30px\">Set-SPOSite<\/p>\n<p style=\"margin-left:30px\">Set-SPOSiteGroup<\/p>\n<p style=\"margin-left:30px\">Set-SPOTenant<\/p>\n<p style=\"margin-left:30px\">Set-SPOTenantSyncClientRestriction<\/p>\n<p style=\"margin-left:30px\">Set-SPOUser<\/p>\n<p style=\"margin-left:30px\">Submit-SPOMigration<\/p>\n<p style=\"margin-left:30px\">Test-SPOSite<\/p>\n<p style=\"margin-left:30px\">Upgrade-SPOSite<\/p>\n<h2>What about missing cmdlets?<\/h2>\n<p>What? No <b>SPOWeb<\/b>? Well, let&rsquo;s get more cmdlets then! Gary LaPointe to the rescue! Go to <a href=\"http:\/\/blog.falchionconsulting.com\/index.php\/downloads\/\" target=\"_blank\">APTILLON Sharepoint Automation<\/a> and click <a href=\"http:\/\/www.thelapointes.com\/blog\/Lapointe.SharePointOnline.PowerShell.msi\" target=\"_blank\">Installer: Lapointe.SharePointOnline.PowerShell.msi<\/a>.<\/p>\n<p>Run that.<\/p>\n<p>Now how many cmdlets do you have?<\/p>\n<p style=\"margin-left:30px\">get-command -Noun SPO* | where moduleName -like Lapointe.SharePointOnline.* | measure<\/p>\n<p>45! Yay! What are they?<\/p>\n<p style=\"margin-left:30px\">PS C:\\Windows\\system32&gt; get-command -Noun SPO* | where moduleName -like Lapointe.SharePointOnline.* | <br \/>Select-Object Name | Sort-Object Name<\/p>\n<p style=\"margin-left:30px\">Name<\/p>\n<p style=\"margin-left:30px\">&#8212;-<\/p>\n<p style=\"margin-left:30px\">Add-SPOContentType<\/p>\n<p style=\"margin-left:30px\">Add-SPOField<\/p>\n<p style=\"margin-left:30px\">Add-SPOListViewWebPart<\/p>\n<p style=\"margin-left:30px\">Add-SPOSolution<\/p>\n<p style=\"margin-left:30px\">Add-SPOWebPart<\/p>\n<p style=\"margin-left:30px\">Connect-SPOSite<\/p>\n<p style=\"margin-left:30px\">Disable-SPOFeature<\/p>\n<p style=\"margin-left:30px\">Disconnect-SPOSite<\/p>\n<p style=\"margin-left:30px\">Enable-SPOFeature<\/p>\n<p style=\"margin-left:30px\">Export-SPOSearchConfiguration<\/p>\n<p style=\"margin-left:30px\">Export-SPOTaxonomy<\/p>\n<p style=\"margin-left:30px\">Get-SPOContentType<\/p>\n<p style=\"margin-left:30px\">Get-SPOContextSite<\/p>\n<p style=\"margin-left:30px\">Get-SPOEventReceiver<\/p>\n<p style=\"margin-left:30px\">Get-SPOFeature<\/p>\n<p style=\"margin-left:30px\">Get-SPOFile<\/p>\n<p style=\"margin-left:30px\">Get-SPOFolder<\/p>\n<p style=\"margin-left:30px\">Get-SPOList<\/p>\n<p style=\"margin-left:30px\">Get-SPOTerm<\/p>\n<p style=\"margin-left:30px\">Get-SPOTermGroup<\/p>\n<p style=\"margin-left:30px\">Get-SPOTermSet<\/p>\n<p style=\"margin-left:30px\">Get-SPOTermStore<\/p>\n<p style=\"margin-left:30px\">Get-SPOWeb<\/p>\n<p style=\"margin-left:30px\">Get-SPOWebPart<\/p>\n<p style=\"margin-left:30px\">Import-SPOSearchConfiguration<\/p>\n<p style=\"margin-left:30px\">Import-SPOTaxonomy<\/p>\n<p style=\"margin-left:30px\">Install-SPOSolution<\/p>\n<p style=\"margin-left:30px\">Invoke-SPORestMethod<\/p>\n<p style=\"margin-left:30px\">New-SPOContentType<\/p>\n<p style=\"margin-left:30px\">New-SPOField<\/p>\n<p style=\"margin-left:30px\">New-SPOFile<\/p>\n<p style=\"margin-left:30px\">New-SPOList<\/p>\n<p style=\"margin-left:30px\">New-SPOListFolder<\/p>\n<p style=\"margin-left:30px\">New-SPOListItem<\/p>\n<p style=\"margin-left:30px\">New-SPOTermGroup<\/p>\n<p style=\"margin-left:30px\">New-SPOTermSet<\/p>\n<p style=\"margin-left:30px\">New-SPOWeb<\/p>\n<p style=\"margin-left:30px\">New-SPOWikiPage<\/p>\n<p style=\"margin-left:30px\">Remove-SPOContentType<\/p>\n<p style=\"margin-left:30px\">Remove-SPOList<\/p>\n<p style=\"margin-left:30px\">Remove-SPOWeb<\/p>\n<p style=\"margin-left:30px\">Set-SPOList<\/p>\n<p style=\"margin-left:30px\">Set-SPOWeb<\/p>\n<p style=\"margin-left:30px\">Set-SPOWebTheme<\/p>\n<p style=\"margin-left:30px\">Set-SPOWikiPageLayout<\/p>\n<h2>Even more SharePoint cmdlets<\/h2>\n<p>Ah, that&rsquo;s more like it! Cmdlets to work with lists and libraries. Now we&rsquo;re talking!<\/p>\n<p>However, if you want more cmdlets and some examples, take a look at this CodePlex project: <a href=\"https:\/\/sharepointpowershell.codeplex.com\/\" target=\"_blank\">Client-side SharePoint PowerShell<\/a>.<\/p>\n<p>Now that we have the cmdlets in the SharePoint Online Management Console and the cmdlets from Gary LaPointe, we can do things like this:<\/p>\n<p style=\"margin-left:30px\">function global:Get-SPOWebInfo {<\/p>\n<p style=\"margin-left:30px\">&lt;#<\/p>\n<p style=\"margin-left:30px\">.SYNOPSIS<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This demonstrates the use of some cmdlets for Office 365 Sites.<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; .DESCRIPTION<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This demonstrates the use of some cmdlets for Office 365 Sites using both Microsoft&#039;s and Gary LaPointe&#039;s cmdlets for SharePoint Online.<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; .PARAMETER TenantAdminURL<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Admin URL for your O365 Tenant.&nbsp; For example, if your tenant is https:\/\/foo.sharepoint.com, your Admin URL is https:\/\/foo-admin.sharepoint.com.<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; .PARAMETER&nbsp; Login<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Your O365 login email.<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; .PARAMETER&nbsp; Password<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Your O365 login password.<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; .EXAMPLE<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp; get-SPOWebInfo -TenantAdminURL foo.sharepoint.com -Login login@somedomain.com -password SomeStrongPasswordGoesHere&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp; .OUTPUTS<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Writes out the URL of every web in every site.<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; .NOTES<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Author: Michael Blumenthal, PSC Group LLC<\/p>\n<p style=\"margin-left:30px\">#&gt;<\/p>\n<p style=\"margin-left:30px\">Param<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [parameter(Mandatory=$true, HelpMessage=&quot;Enter the Admin URL for your O365 tenant.&quot;)]<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Uri]<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $TenantURL,<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [parameter(Mandatory=$true, HelpMessage=&quot;Enter your admin login.&quot;)]<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [System.String]<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $Login,<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [System.Security.SecureString][Parameter(Mandatory=$true, HelpMessage=&quot;Enter your super secret strong password.&quot;)]<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $password<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; $credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $Login, $password<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; Connect-SPOService -Url $TenantURL -Credential $credential&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp; $SiteCollections = Get-SPOSite -Detailed<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp; foreach ($SiteCollection in $SiteCollections)<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp; {<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write-host $SiteCollection.Url -foregroundcolor Blue&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rootwebUrl = $SiteCollection.Url<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try {<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connect-SPOSite -Credential $credential -Url $rootwebURL&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $allwebs = Get-SPOWeb -Detail&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #each web is a Microsoft.SharePoint.Client.Web<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach ($web in $allwebs)<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write-host &quot;In &quot; $web.Title &quot;at&quot; $web.Url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Catch [Microsoft.SharePoint.Client.ServerUnauthorizedAccessException] {<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write-Host -ForegroundColor Yellow &quot;SUAE error.&quot;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Catch [System.Net.WebException] {<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write-Host -ForegroundColor Yellow &quot;WebException.&quot;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write-Host -ForegroundColor Yellow $_.exception.Message<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Catch {<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ErrorMessage = $_.Exception.Message<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $FailedItem = $_.Exception.ItemName<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ExceptionType = $_.Exception.GetType().FullName;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write-host -ForegroundColor Yellow &quot;Other exception: &quot; $ExceptionType<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write-host -ForegroundColor Yellow Message: $ErrorMessage<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write-host -ForegroundColor Yellow Failed Item $FailedItem<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp; Disconnect-SPOService&nbsp;<\/p>\n<p style=\"margin-left:30px\">}<\/p>\n<p style=\"margin-left:30px\">get-command Get-SPOWebInfo&nbsp;<\/p>\n<h2>&nbsp;Let&#039;s check it out<\/h2>\n<p>Now run <b>Get-SPOWebInfo<\/b>, and give it a try!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/wes-6-21-15-2.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/wes-6-21-15-2.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>~Michael<\/p>\n<p>Thank you, Michael. Great introduction to finding and using SharePoint cmdlet resources.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b><span style=\"font-size:12px\">&nbsp;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Guest blogger, Michael Blumenthal shows how to findWindows PowerShell cmdlets that are available for Office 365 sites. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a new guest blogger, Michael Blumenthal, who we met in Chicago in May at Microsoft Ignite. Here is a little bit about Michael: Michael Blumenthal is a [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[56,593,291,594,3,595,61,45],"class_list":["post-5421","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-guest-blogger","tag-michael-blumenthal","tag-office-365","tag-office-365-sites","tag-scripting-guy","tag-sharepoint-online","tag-weekend-scripter","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Guest blogger, Michael Blumenthal shows how to findWindows PowerShell cmdlets that are available for Office 365 sites. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a new guest blogger, Michael Blumenthal, who we met in Chicago in May at Microsoft Ignite. Here is a little bit about Michael: Michael Blumenthal is a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/5421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=5421"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/5421\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=5421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=5421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=5421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}