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
# Azure AD OAuth Application Token for Graph API | |
# Get OAuth token for a AAD Application (returned as $token) | |
$clientId = "YOUR Client ID" | |
$tenantId = "YOUR Tenant ID" | |
$clientSecret = 'YOUR Client Secret' | |
# Construct URI | |
$uri = "https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token" |
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
Start-PodeServer { | |
New-PodeLoggingMethod -File -Name 'errors' -Path C:\WebSrv | Enable-PodeErrorLogging | |
New-PodeAuthScheme -Form | Add-PodeAuthWindowsLocal -Name 'WinAuth' -NoGroups -Users @('UpReader') -Sessionless | |
Add-PodeEndpoint -Address * -Port 8118 -Protocol Https -CertificateStoreLocation LocalMachine -CertificateName server.fqdn | |
Add-PodeRoute -Method Get -Path '/oemAgents' -ScriptBlock { |
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
param( | |
[Parameter(Mandatory=$true)] | |
[string]$sourceManagementPackDisplayName, | |
[Parameter(Mandatory=$true)] | |
[string]$overrideManagementPackDisplayName, | |
[Parameter(Mandatory=$true)] | |
[ValidateSet('unitMoninitor','rule')] | |
[string]$itemType, |
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
Function Invoke-ScheduledTaskCreation { | |
<# | |
.Synopsis | |
Creates a temporary scheduled task to run the cmd-file privously created. | |
Required work-around as PowerShell limitation to run in the User's session interactivly. | |
.Example | |
Invoke-ScheduledTaskCreation -filenName $serverStartFile | |
#> | |