Skip to content

Commit

Permalink
new example
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Jul 18, 2023
1 parent d62d249 commit dbb9fb7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Examples/GetO365AzureExternalCollaborationRestrictions.ps1
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

0 comments on commit dbb9fb7

Please sign in to comment.