Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (16 sloc) 547 Bytes
#Connect To Sharepoint Online
#Name of your tenant for example Contoso
$name = Read-Host -Prompt "Name of Company"
Connect-SPOService -Url "https://$" -Credential ""
#Run policy check
$testconnection = get-SPOTenant
#If blank, failed
if ($testconnection -eq $NULL) {
Write-Output "Connection failed....."
} else {
#If values are returned, show connected...
Write-Output "`n"
Write-Output "Connected to $"
Write-Output "To check policies, run 'get-SPOTenant'"
Write-Output "`n"
You can’t perform that action at this time.