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
#!/usr/bin/env pwsh | |
# permission denied in AWX? do this: git add --chmod=+x path/to/file | |
# instance properties to add to _meta | |
$properties = @("*") | |
# regex to exclude instance tags | |
$tagExclusions = "bd_gitpath|workload_type" | |
# read cloud inventory json | |
$cloudInventory = Get-Content inventory.json | ConvertFrom-Json | |
# determine which subprojects are auditable |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
#MaxThreadsPerHotkey 1 | |
; Critical strike + Circular strike + animation cancel | |
XButton1:: | |
send,{f1} | |
send,{f4} | |
sleep,450 | |
; prone |
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 Optimize-DRSSeparateVMs { | |
<# | |
.SYNOPSIS | |
Creates DRS rules to keep similar VMs on separate VMHosts.Existing AntiAffinity rules are removed. | |
If VMHosts.count is less than or equal to 4, the max VMs per group is count-1. Otherwise count-2 | |
.EXAMPLE | |
Create DRS rules on MYCLUSTER | |
Optimize-DRSSeparateVMs -Cluster MYCLUSTER | |
.EXAMPLE | |
Create DRS rules on all clusters |
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
; https://www.autohotkey.com/docs/Hotkeys.htm | |
; ^ = Control | |
; * = Wildcard: Fire the hotkey even if extra modifiers are being held down | |
; ~ = When the hotkey fires, its key's native function will not be blocked (hidden from the system) | |
; Click positions assume 1920x1080 resolution | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
#MaxThreadsPerHotkey 2 | |
SetDefaultMouseSpeed 0 |
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
; https://www.autohotkey.com/docs/Hotkeys.htm | |
; ^ = Control | |
; * = Wildcard: Fire the hotkey even if extra modifiers are being held down | |
; ~ = When the hotkey fires, its key's native function will not be blocked (hidden from the system) | |
; Click positions assume 1920x1080 resolution | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
#MaxThreadsPerHotkey 1 | |
SetDefaultMouseSpeed 0 |
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
; https://www.autohotkey.com/docs/Hotkeys.htm | |
; ^ = Control | |
; * = Wildcard: Fire the hotkey even if extra modifiers are being held down | |
; ~ = When the hotkey fires, its key's native function will not be blocked (hidden from the system) | |
; Click positions assume 1920x1080 resolution | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
#MaxThreadsPerHotkey 1 | |
SetDefaultMouseSpeed 0 |
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 Get-1NotePage { | |
<# | |
.SYNOPSIS | |
Finds the ID of a OneNote page | |
.DESCRIPTION | |
http://thebackend.info/powershell/2017/12/onenote-read-and-write-content-with-powershell/ | |
.EXAMPLE | |
Get-1NotePage -Name "PowerShell Test" | |
#> | |
[cmdletbinding()] |
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
<# | |
.SYNOPSIS | |
Collect configuration metrics for a VMHost, Cluster, Datacenter, or vCenter. For each VM Host found, these metrics are collected: | |
-Parent object(Cluster, Datacenter) | |
-Hardware model | |
-ESXi build | |
-IP address | |
-VMs on host | |
-physical CPUs(pCPU) on host | |
-virtual CPUs(vCPU) allocated |
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
vCenter | Credentials | |
---|---|---|
vcenter-a | domain.local\credentials | |
old-vcenter | sub.domain.local\credentials | |
Vcenter-reallylongname | domain.local\credentials |
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 cvi([switch]$client) { | |
#Read vcenters.csv and draw menu | |
$vcenters = Import-Csv "C:\Scripts\vcenters.csv" | |
Write-Host "Select a server from the list" | |
for($i = 1; $i -lt $vcenters.count + 1; $i++) { Write-Host "[$i] $($vcenters[$i-1].vCenter)" } | |
#Switch $option to determine selected vCenter | |
$option = Read-Host | |
switch -Regex ($option) { | |
"\d" { |
NewerOlder