-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d62d249
commit dbb9fb7
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
Examples/GetO365AzureExternalCollaborationRestrictions.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Import-Module .\O365Essentials.psd1 -Force | ||
|
||
if (-not $Credentials) { | ||
# $Credentials = Get-Credential | ||
} | ||
# This makes a connection to Office 365 tenant | ||
# since we don't want to save the data we null it out | ||
# keep in mind that if there's an MFA you would be better left without Credentials and just let it prompt you | ||
|
||
$null = Connect-O365Admin -Verbose #-Credential $Credentials | ||
|
||
Get-O365AzureExternalCollaborationRestrictions | ||
Set-O365AzureExternalCollaborationRestrictions -CollaborationRestrictions AllowAnyDomains -Verbose | ||
#Set-O365AzureExternalCollaborationRestrictions -CollaborationRestrictions DisallowSpecifiedDomains -TargetedDomains 'test.com' -Verbose | ||
#Set-O365AzureExternalCollaborationRestrictions -CollaborationRestrictions AllowSpecifiedDomains -TargetedDomains 'test.com' -Verbose |