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
# Get text output of qwinsta | |
$qwinstaOutput = &qwinsta.exe | |
# Column definitions (in the order as they appear in the output of qwinsta) | |
# Name --> Name of the property in the output object | |
# Start --> Should always be 0 and is detected automatically later in the script (varies depending on the output language) | |
# Length -eq 0 --> Column is left aligned with variable length (detected later in the script) | |
# Length -gt 0 --> Column is right aligned with fixed length | |
$columnInfo = @( | |
[PSCustomObject]@{ |
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
#Requires -Modules Microsoft.Graph.Authentication, Microsoft.Graph.Applications | |
[CmdletBinding()] | |
param ( | |
# Name, application ID or object ID of the managed identity | |
[Parameter(Mandatory = $true)] | |
[string] | |
$ManagedIdentity, | |
# Name or ID of the Graph API permission (application role) |
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
$app = '{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe' | |
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | |
$Template = [Windows.UI.Notifications.ToastTemplateType]::ToastImageAndText01 | |
#Gets the Template XML so we can manipulate the values | |
[xml]$ToastTemplate = ([Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent($Template).GetXml()) | |
[xml]$ToastTemplate = @" | |
<toast duration="long" launch="app-defined-string"> |