Skip to content

SPO Powershell

Check Version

Latest Version - https://www.powershellgallery.com/packages/Microsoft.Online.SharePoint.PowerShell/16.0.8119.0

Get-Module Microsoft.Online.SharePoint.PowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending

Update Module to the latest version

Update-Module Microsoft.Online.SharePoint.PowerShell

Delete the old version

Get-InstalledModule -Name "Microsoft.Online.SharePoint.PowerShell" -RequiredVersion 16.0.8119.0 | Uninstall-Module

Check Different File Version

Get-ChildItem -Path 'C:\Program Files\WindowsPowerShell\Modules\Microsoft.Online.SharePoint.PowerShell\*Microsoft.SharePoint*.dll' -Recurse | ft Name,@{Label="Version";Expression={$_.VersionInfo.FileVersion}} -AutoSize

# Search in GAC_MSIL
Get-ChildItem -Path C:\Windows\Microsoft.NET\assembly\GAC_MSIL\*Microsoft.SharePoint*.dll -Recurse | ft Name,@{Label="Version";Expression={$_.VersionInfo.FileVersion}} -AutoSize

Credential Manager

Connect

Connect-SPOService https://devro-admin.sharepoint.com -Credential admin@devro.onmicrosoft.com

Disconnect

Disconnect-SPOService

ULS-Correlation ID

get-splogevent -starttime (get-date).addminutes(-20) | where-object { $_.correlation -eq "e434f79b-68bb-40d2-0000-03a47eae1bf9" } | fl message > c:\errors1.txt

Security

get-sposite | ?{$_.DenyAddAndCustomizePages -eq 'Disabled'}
 ```

## Ressources

- [resources-to-learn-powershell-for-office-365](https://absolute-sharepoint.com/2018/03/resources-to-learn-powershell-for-office-365.html)

## Tenant Configuration

### Remove Feedback Button

```Powershell
Set-SPOTenant -UserVoiceForFeedbackEnabled:$false