PowerShell

Jak získat verzi tenantu pomocí powershellu

Pokud někdy řešíte chyby v Sharepointu Online je dobré vědět kterou verzi máte v ostrém provozu.
Tento skript by Vám měl vypsat číslo verze vč. buildu který máte k dispozici.

#Pridani knihoven pro praci
Add-Type -Path “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll”
Add-Type -Path “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll”

#Zadefinovani uzivatele a hesla
$Username = Read-Host -Prompt “Please enter your username”
$Password = Read-Host -Prompt “Please enter your password” -AsSecureString
$Site = “https://nazevtenantu.sharepoint.com”

#Pripojeni k tenantu a ziskani verze
$Context = New-Object Microsoft.SharePoint.Client.ClientContext($Site)
$Creds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username,$Password)
$Context.Credentials = $Creds
$Context.ExecuteQuery()

Write-Host “Server Version:” $Context.ServerVersion -ForegroundColor Green

Ohodnoťte článek
Sending
User Review
5 (1 vote)

O autorovi

Radek Vlach

IT specialista
Institute of Computer Science
Masaryk University
Zaměření: SharePoint, Active Directory , O365, Oracle, SQL, RMS, Office 365 Security & Compliance

Zanechat komentář

Tato stránka používá Akismet k omezení spamu. Podívejte se, jak vaše data z komentářů zpracováváme..

error: Obsah je cháněný / Content is protected !!