Skip to content

Commit

Permalink
Update cmdlets
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Aug 21, 2021
1 parent e540ecc commit ed307d9
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Public/Get-O365BriefingEmail.ps1
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
}
}
}
37 changes: 37 additions & 0 deletions Public/Set-O365BriefingEmail.ps1
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
}
10 changes: 10 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,13 @@ That's it. Whenever there's a new version, you run the command, and you can enjo

- 0.0.1 - 2021.08.19
- First version

## Cmdlets available

| Get cmdlet | Set cmdlet | Native API available | Description |
| --------------------------- | ----------------------- | -------------------- | --------------------------------- |
| Get-O365AzureSpeechServices | Set-AzureSpeechServices | No | Get and set Azure Speech Services |
| Get-O365Forms | Set-O365Forms | | Get and set Forms |
| Get-O365Planner | Set-O365Planner | | Get and set Planner |
| Get-O365Bookinsg | ---- | Think so | Get Bookings |
| Get-O365BriefingEmail | Set-O365BriefingEmail | No | Get and set Briefing Email |

0 comments on commit ed307d9

Please sign in to comment.