Skip to content

Commit

Permalink
Updated O365 Import Script
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoopman committed Oct 9, 2017
1 parent a86f017 commit e382475
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Examples/Office365 Groups/O365_Import.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,16 @@ ForEach ($Product in $O365.products.product) {
$i = $MSList.Add("$($MSO365)_$($Entry)")
}
} ElseIf ($Type -eq "URL") {
if ($PrintURLs.IsPresent) {
Write-Host " Hostname ($GroupName) : $Entry"
}
if ($IncludeNonMSURLs.IsPresent) {
$i = $MSURLList.Add($Entry)
if ($PrintURLs.IsPresent) {
New-Object PSObject -Property @{"Product" = $Product.Name; "URL" = $Entry}
}
} ElseIf (like $Entry $IncludeURLs) {
$i = $MSURLList.Add($Entry)
if ($PrintURLs.IsPresent) {
New-Object PSObject -Property @{"Product" = $Product.Name; "URL" = $Entry}
}
} else {
$Split = $Entry.Split(".")
$DomainName = "$($Split[-2]).$($Split[-1])"
Expand All @@ -190,6 +193,9 @@ ForEach ($Product in $O365.products.product) {
$IsMS = (@(Compare-Object $DomainNS $MSNS -includeequal -excludedifferent).count -gt 0)
if ($IsMS) {
$i = $MSURLList.Add($Entry)
if ($PrintURLs.IsPresent) {
New-Object PSObject -Property @{"Product" = $Product.Name; "URL" = $Entry}
}
} else {
#Write-Verbose "Excluding URL $Entry as domain $DomainName not Microsoft."
}
Expand Down

0 comments on commit e382475

Please sign in to comment.