forked from jhoneill/MsftGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Users.Actions.ps1
28 lines (26 loc) · 1.28 KB
/
Users.Actions.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using namespace Microsoft.Graph.PowerShell.Models
#MicrosoftGraphMailTips object is isn Microsoft.Graph.Users.Actions.private.dll
param()
function Get-GraphMailTips {
<#
.synopsis
Gets mail tips for one or more users (is their mailbox full, are auto-replies on etc)
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns', '', Justification="MailTip would be incorrect")]
param (
#mail addresses
[Parameter(Mandatory=$true)]
[string[]]$Address
)
$webparams = @{
'Method' = 'post'
'Uri' = "$GraphUri/me/getMailTips"
'ContentType' = 'application/json'
'body' = Convertto-Json @{EmailAddresses= @() + $Address;
MailTipsOptions= "automaticReplies, mailboxFullStatus, customMailTip, "+
"deliveryRestriction, externalMemberCount, maxMessageSize, " +
"moderationStatus, recipientScope, recipientSuggestions, totalMemberCount"
}
}
Invoke-GraphRequest @webparams -ValueOnly -AsType ([MicrosoftGraphMailTips])
}