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
using Pulumi; | |
using System; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using AzureNextGen = Pulumi.AzureNextGen; | |
using K8s = Pulumi.Kubernetes; | |
using Helm3 = Pulumi.Kubernetes.Helm.V3; | |
class MyStack : Stack |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"final_space": false, | |
"console_title": false, | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"horizontal_offset": 0, | |
"vertical_offset": 0, |
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
$tenantId = '' | |
$context = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile.DefaultContext | |
$token = [Microsoft.Azure.Commands.Common.Authentication.AzureSession]::Instance.AuthenticationFactory.Authenticate( | |
$context.Account, | |
$context.Environment, | |
$context.Tenant.Id.ToString(), | |
$null, | |
[Microsoft.Azure.Commands.Common.Authentication.ShowDialog]::Never, | |
$null, | |
'https://management.azure.com/' |
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-WECSubscription { | |
param ( | |
[Parameter(ValueFromPipeline, ValueFromPipeLineByPropertyName)] | |
[ValidateNotNullOrEmpty()] | |
[string] $Name, | |
[switch] $Detailed | |
) | |
begin { | |
$wecUtilPresent = ($null -ne (Get-Command -CommandType Application -Name wecutil -ErrorAction SilentlyContinue)) |
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 Convert-PesterResultToJUnitXml { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
$PesterResult | |
) | |
$junit = '<?xml version="1.0" encoding="utf-8"?>' | |
$junit += "`n" + '<testsuites name="Pester" tests="{0}" failures="{1}" disabled="{2}" time="{3}">' -f @( | |
$PesterResult.TotalCount, |
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
[cmdletbinding()] | |
param ( | |
[Parameter(Mandatory)] | |
[string] $Path, | |
[Parameter(Mandatory)] | |
[string] $PFXPin | |
) | |
$resolvedPath = Resolve-Path -Path $Path |
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"automationAccountName": { | |
"type": "string", | |
"metadata": { | |
"description": "The name of the automation account." | |
} | |
}, |
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
Mock -CommandName Get-SomeCommand -MockWith { | |
param ( | |
$ErrorVariable | |
) | |
$errorRecord = [System.Management.Automation.ErrorRecord]::new( | |
[System.Exception]::new('Failed!'), | |
'Error', | |
[System.Management.Automation.ErrorCategory]::InvalidOperation, | |
$null | |
) |
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
$enums = Get-ChildItem -Path $PSScriptRoot\enums\*.ps1 -ErrorAction SilentlyContinue | ForEach-Object -Process { | |
Get-Content $_.FullName | |
} | |
if (Test-Path "$PSScriptRoot\Classes\classes.psd1") { | |
$ClassLoadOrder = Import-PowerShellDataFile -Path "$PSScriptRoot\classes\classes.psd1" -ErrorAction SilentlyContinue | |
} | |
$classes = foreach ($class in $ClassLoadOrder.order) { | |
$path = '{0}\classes\{1}.ps1' -f $PSScriptRoot, $class |
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-SoftwareUpdateConfigurations { | |
[CmdletBinding(DefaultParameterSetName = 'list')] | |
param ( | |
[Parameter(Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[string] $ResourceGroupName, | |
[Parameter(Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[string] $AutomationAccountName, |
NewerOlder