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
$adal = "${env:ProgramFiles(x86)}\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Services\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" | |
$adalforms = "${env:ProgramFiles(x86)}\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Services\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll" | |
[System.Reflection.Assembly]::LoadFrom($adal) | |
[System.Reflection.Assembly]::LoadFrom($adalforms) | |
$adTenant = 'bla.onmicrosoft.com' | |
$subscriptionid = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' | |
$jobname = 'MyJob' | |
$collection = 'MyCollection' | |
$location = 'westeurope' | |
$clientId = '1950a258-227b-4e31-a9cf-717495945fc2' |
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-NetPort { | |
[CmdletBinding()] | |
[OutputType([Boolean])] | |
param ( | |
[Parameter(Mandatory, | |
ValueFromPipeline, | |
ValueFromPipelineByPropertyName)] | |
[String] $ComputerName, | |
[Parameter(Mandatory, |
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-CorpSysInfo { | |
[cmdletbinding()] | |
param ( | |
[Parameter(ValueFromPipeline, | |
ValueFromPipelineByPropertyName)] | |
[ValidateNotNullOrEmpty()] | |
[String[]] $ComputerName = $env:COMPUTERNAME, | |
[ValidateSet('dcom','Wsman')] | |
[String] $Protocol = 'Wsman' |
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
#ChildRunbook to stop lingering sessions which is called inline | |
workflow Stop-LingeringSession { | |
param ( | |
[Parameter(Mandatory)] | |
[Int] $ProcessId, | |
[Parameter(Mandatory)] | |
[String] $Server, | |
[Parameter(Mandatory)] |
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
enum Ensure | |
{ | |
Absent | |
Present | |
} | |
enum List | |
{ | |
First = 1 | |
Second = 2 |
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
configuration SQL | |
{ | |
Import-DscResource -ModuleName xSQLServer,xDisk | |
node sql01 | |
{ | |
xWaitForDisk SMAInstallDisk | |
{ | |
DiskNumber = 2 | |
RetryIntervalSec = 60 | |
RetryCount = 60 |
NewerOlder