This file contains hidden or 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 Add-AzStorageAccount { | |
<# | |
.Synopsis | |
This function creates a standardised storage account in the ResourceGroupName | |
.Example | |
Add-QmAzStorageAccount -ResourceGroupName AUSC1-FRG -Name ausc1frgdiagag3249b -Location "uscentral" | |
#> | |
[CmdletBinding()] | |
param( |
This file contains hidden or 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
@{ | |
ModuleVersion = '0.1.0' | |
# Modules that must be imported into the global environment prior to importing this module | |
RequiredModules = @( | |
) | |
# Exports. Populated by Optimize-Module during the build step. | |
# For best performance, do not use wildcards and do not delete these entry! |
This file contains hidden or 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 ConvertTo-ProductKey { | |
[CmdletBinding()] | |
param( | |
[byte[]]$Key, | |
[switch]$Validate | |
) | |
end { | |
$KeyOffset = 52 | |
[char[]]$Chars = "BCDFGHJKMPQRTVWXY2346789" | |
$KeyOutput = "" |
This file contains hidden or 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-ModifiedTests { | |
<# | |
.Synopsis | |
Gets a list of changed files in a repository, and run every changed test and test matching a changed function/file | |
.Description | |
This assumes that each file has a matching .Tests.ps1 file, suited for running with Pester. It also ignores Integration tagged tests. | |
.Example | |
Invoke-ModifiedTests -Repository C:\Source\Module |
This file contains hidden or 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 namespace Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters | |
function Export-PfxFromAzureKeyVault { | |
<# | |
.Synopsis | |
Exports a PFX file from an Azure KeyVault Certificate | |
.Example | |
Export-PfxFromAzureKeyVault -VaultName TestVault -Name TestCert -Password $SecurePW -Path C:\Temp\TestCert.pfx | |
#> |
This file contains hidden or 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 namespace Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters | |
function Invoke-AzVMScript { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory)] | |
[ResourceGroupCompleter()] | |
[string]$ResourceGroupName, | |
[Parameter(Mandatory)] |
This file contains hidden or 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
class fileregion { | |
hidden [string]$OriginalFilePath | |
[string]$RelativeFilePath | |
[int]$StartLine | |
[int]$EndLine | |
} | |
function Get-FileRegions { | |
param( | |
[string[]]$Path |
This file contains hidden or 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 Export-Variable { | |
[CmdletBinding()] | |
param( | |
[ArgumentCompleter({ | |
param($CommandName, $ParameterName, $WordToComplete, $CommandAst, $BoundParams) | |
$Current = $BoundParams.Name | |
(Get-Variable).Name.Where({$_ -like "*$($WordToComplete)*" -and $_ -notin $Current}) | |
})] | |
[Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] | |
[string[]]$Name, |
This file contains hidden or 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 Add-AzureModule { | |
[CmdletBinding(DefaultParameterSetName="Calculated")] | |
param( | |
[Parameter(ParameterSetName="Calculated", Position=0)] | |
[ArgumentCompleter({ | |
param($CommandName, $ParameterName, $WordToComplete, $CommandAst, $BoundParams) | |
(Get-ChildItem C:\Modules\).Where({$_ -like "*$WordToComplete*_*"}).Name | %{$_.Split('_')[0]} | Sort-Object -Unique | |
})] | |
[string]$Name, |
This file contains hidden or 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
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Build Arduino for Badgey", | |
"type": "process", | |
"command": "echo No idea, sorry", | |
"windows": { |