Get-PowerAppsNotification
PowerApps: Retrieves PowerApps notifications
#Requires -Version 5.1
#Requires -Modules Microsoft.PowerApps.PowerShell
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[pscredential]$PACredential,
[string]$UserId,
[string]$ApiVersion
)
Process {
try {
ConnectPowerApps4Creators -PAFCredential $PACredential
$getArgs = @{ ErrorAction = 'Stop' }
if ($PSBoundParameters.ContainsKey('UserId')) { $getArgs.Add('UserId', $UserId) }
if ($PSBoundParameters.ContainsKey('ApiVersion')) { $getArgs.Add('ApiVersion', $ApiVersion) }
$result = Get-PowerAppsNotification @getArgs -ErrorAction Stop | Select-Object *
if ($null -ne $result) { foreach ($item in $result) { $item | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format "yyyy-MM-dd HH:mm:ss") -PassThru -Force } }
}
catch { throw }
finally { DisconnectPowerApps4Creators }
}PowerApps credentials for authentication
Return notifications for a specific user
API version to call