-
-
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
e540ecc
commit ed307d9
Showing
3 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,10 +1,31 @@ | ||
function Get-O365BriefingEmail { | ||
<# | ||
.SYNOPSIS | ||
Gets status of Briefing emails. | ||
.DESCRIPTION | ||
Long description | ||
.PARAMETER Headers | ||
Parameter description | ||
.EXAMPLE | ||
An example | ||
.NOTES | ||
General notes | ||
#> | ||
[cmdletbinding()] | ||
param( | ||
[alias('Authorization')][System.Collections.IDictionary] $Headers | ||
) | ||
|
||
$Uri = "https://admin.microsoft.com/admin/api/services/apps/briefingemail" | ||
$Output = Invoke-O365Admin -Uri $Uri -Headers $Headers | ||
$Output | ||
if ($Output) { | ||
[PSCustomObject] @{ | ||
IsMailEnabled = $Output.IsMailEnabled | ||
IsSubscribedByDefault = $Output.IsSubscribedByDefault | ||
} | ||
} | ||
} |
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,37 @@ | ||
function Set-O365BriefingEmail { | ||
<# | ||
.SYNOPSIS | ||
Let people in your organization receive Briefing Email | ||
.DESCRIPTION | ||
Let people in your organization receive Briefing Email | ||
.PARAMETER Headers | ||
Parameter description | ||
.PARAMETER SubscribeByDefault | ||
Subscribes or unsubscribes people in your organization to receive Briefing Email | ||
.EXAMPLE | ||
An example | ||
.NOTES | ||
Users will receive Briefing email by default, but can unsubscribe at any time from their Briefing email or Briefing settings page. Email is only sent to users if their Office 365 language is English or Spanish. | ||
#> | ||
[cmdletbinding()] | ||
param( | ||
[alias('Authorization')][System.Collections.IDictionary] $Headers, | ||
#[bool] $MailEnable, | ||
[bool] $SubscribeByDefault | ||
) | ||
$Uri = "https://admin.microsoft.com/admin/api/services/apps/briefingemail" | ||
|
||
$Body = @{ | ||
value = @{ | ||
IsSubscribedByDefault = $SubscribeByDefault | ||
} | ||
} | ||
$Output = Invoke-O365Admin -Uri $Uri -Headers $Headers -Method POST -Body $Body | ||
$Output | ||
} |
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