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
/*Exception details: | |
https://fef.msub03.manage.microsoft.com/DeviceConfiguration_2010/StatelessDeviceConfigurationFEService/deviceManagement/deviceConfigurations?api-version=5020-09-25 | |
iosWiFiConfiguration as JSON | |
{ | |
"connectAutomatically": true, | |
"connectWhenNetworkNameIsHidden": true, | |
"disableMacAddressRandomization": false, | |
"networkName": "4999", | |
"preSharedKey": "ThaKey12348", | |
"proxySettings": "none", |
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 Get-LithnetAutoSyncStatus | |
{ | |
<# | |
.Synopsis | |
Checks the Lithnet AutoSync Execution monitor status | |
.DESCRIPTION | |
This command checks the status of the Lithnet AutoSync execution monitor. If the monitor is started it will retun "running". If is | |
is not running, it will return "stopped". Cmdlet must be executed on host which has the AutoSync service installed. | |
More information about AutoSync is available here: https://github.com/lithnet/miis-autosync |
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 Test-Command | |
{ | |
[cmdletbinding()] | |
Param() | |
write-verbose -Message "Start" | |
} | |
function Write-Verbose | |
{ | |
[cmdletbinding()] |
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
$exportFunctions = (Get-ChildItem -Path .\Functions -Filter "*.ps1").BaseName | |
$manifestPath = Join-Path -Path .\ -ChildPath FilesAPI.psd1 | |
$newManifest = @{ | |
Path = $manifestPath | |
Guid = ([guid]::NewGuid()) | |
Author = "SomeDude" | |
CompanyName = "Contoso" | |
RootModule = "FilesAPI.psm1" | |
Description = "Awsome files module" |
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 Set-FileApi | |
{ | |
[cmdletbinding( | |
SupportsShouldProcess | |
)] | |
Param( | |
[Parameter(Mandatory)] | |
[hashtable] | |
$Authorization | |
, |
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
$CreateFileEndpoint = New-UDEndpoint -Url "/file/" -Method "Post" -Endpoint { | |
Param( | |
$Authorization | |
, | |
$FileName | |
, | |
$Content | |
) | |
$secretBytes = [System.Convert]::FromBase64String(($Authorization -replace "Basic ")) |
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 Set-FileApi | |
{ | |
[cmdletbinding( | |
SupportsShouldProcess | |
)] | |
Param( | |
[Parameter(Mandatory)] | |
[hashtable] | |
$Authorization | |
, |
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 Get-FileApi | |
{ | |
[cmdletbinding()] | |
Param( | |
[Parameter(Mandatory)] | |
[hashtable] | |
$Authorization | |
, | |
[string] | |
$Name |
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
$GetFileEndpoint = New-UDEndpoint -Url "/file/" -Method "GET" -Endpoint { | |
Param( | |
$Authorization | |
, | |
$Name | |
) | |
if ($request.headers.ContainsKey("Authorization")) | |
{ | |
$Authorization = $request.headers["Authorization"].ToString() |
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 Get-FileApi | |
{ | |
[cmdletbinding()] | |
Param( | |
[Parameter(Mandatory)] | |
[hashtable] | |
$Authorization | |
, | |
[string] | |
$Name |
NewerOlder