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-RandomRequests { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter()] | |
| [uri]$Uri, | |
| [Parameter()] | |
| [int]$Count | |
| ) |
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
| # Global | |
| az graph query -q "project id, name, type, location, tags" | |
| az graph query -q "project tags | summarize buildschema(tags)" | |
| az graph query -q "summarize count()" | |
| az graph query -q "summarize count () by location" | |
| az graph query -q "summarize count () by type" | |
| # Microsoft.Compute | |
| az graph query -q "where type =~ 'Microsoft.Compute/virtualMachines' | summarize count()" | |
| az graph query -q "where type =~ 'Microsoft.Compute/virtualMachines' | summarize count() by subscriptionId" |
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
| switch ($true) { | |
| $IsLinux { | |
| } | |
| $IsMacOS { | |
| } | |
| $IsWindows { | |
| } | |
| } |
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
| # Pester pipeline | |
| pool: | |
| vmImage: 'Ubuntu 16.04' | |
| steps: | |
| # PowerShell | |
| - task: PowerShell@2 | |
| inputs: | |
| targetType: 'inline' | |
| #filepath: '' |
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-TestHarness { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory = $false)] | |
| [ValidateSet("Local", "Agent")] | |
| [string]$Environment, | |
| [Parameter(Mandatory = $false)] | |
| [switch]$CodeCoverage |
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
| { | |
| "version": "2.0.0", | |
| "windows": { | |
| "options": { | |
| "shell": { | |
| "executable": "C:\\Program Files\\PowerShell\\6-preview\\pwsh.exe", | |
| "args": [ | |
| "-NoProfile", | |
| "-Command" | |
| ] |
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
| # Session based | |
| $modules = Get-Module -Name "Az.*" -ListAvailable | |
| $modules.Name | ForEach-Object { Enable-AzureRmAlias -Module $_ -Verbose } |
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
| # Display | |
| Get-InstalledModule ` | |
| | Select-Object ` | |
| Name, ` | |
| @{ n='Installed'; e={ $_.Version } }, ` | |
| @{ n='Available'; e={ ( Find-Module -Name $_.Name ).Version } } ` | |
| | Where-Object ` | |
| { $_.Available -gt $_.Installed } ` | |
| | Format-Table -AutoSize |
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
| #Requires -Modules @{ ModuleName="ThreadJob"; ModuleVersion="1.1.2" } | |
| Get-Job | Remove-Job | |
| $runbooks = "" | |
| $path = (Get-Location).Path | |
| $runbooks | ForEach-Object { | |
| Start-ThreadJob -ScriptBlock { | |
| param ($runbook, $path) | |
| Write-Output ("Importing Runbook - " + $runbook) |