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
$daysToExpire = 30 | |
$SoonToBeExpiredList = @() | |
$AlreadyExpiredList = @() | |
# Connect to AzureAD | |
Write-Output "Connecting to AzureAD..." | |
$connection = Get-AutomationConnection -Name AzureRunAsConnection | |
Connect-AzureAD -TenantId $connection.TenantID -ApplicationId $connection.ApplicationID -CertificateThumbprint $connection.CertificateThumbprint |
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
# THIS HASN'T BEEN ADDED TO THE KBUPDATE REPO YET BUT WILL BE WHEN I GET A MOMENT | |
function Install-KbPatch { | |
<# | |
.SYNOPSIS | |
Installs KBs on local and remote servers on Windows-based systems | |
.DESCRIPTION | |
Installs KBs on local and remote servers on Windows-based systems | |
PowerShell 5.1 must be installed and enabled on the target machine and the target machine must be Windows-based |
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
[CmdletBinding()] | |
param ( | |
$authorisation, | |
$pathFilter, | |
$collectionUri, | |
$project, | |
$buildId | |
) | |
$changesUrl = "$collectionUri/$project/_apis/build/builds/$buildId/changes?api-version=6.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 Open-GHWebEditor { | |
<# | |
.SYNOPSIS | |
Opens the GitHub web editor on a repo. | |
.EXAMPLE | |
Open-GHWebEditor powerShell/powerShell | |
#> | |
param( | |
[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
# Example code of running multiple Pester test in parallel and merging the result into one NUnitReport Test Report file | |
#region Run Pester Test scripts in parallel | |
$job = Get-ChildItem -Path "./tests" -Filter "Demo*" | |
| ForEach-Object -Parallel { | |
Invoke-Pester -Path $_ -PassThru | |
} -ThrottleLimit 10 -AsJob | |
$Results = ($job | Wait-Job | Receive-Job -Keep) | |
#endregion |
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
################################################# | |
# Terraform vs. Pulumi vs. Crossplane # | |
# Infrastructure as Code (IaC) Tools Comparison # | |
# https://youtu.be/RaoKcJGchKM # | |
################################################# | |
######### | |
# Setup # | |
######### |
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-AzSpotPrice { | |
[CmdletBinding()] | |
param ( | |
#VM SKU (e.g. Standard_F8s) | |
[String]$Sku, | |
#Azure Region (e.g. brazilsouth) | |
[String]$Region, | |
#ODATA filter to use on the data | |
[String]$Filter, | |
#Maximum number of records to retrieve, or specify 'Unlimited' for all records. Defaults to 100. This behaves like the Exchange Cmdlets |
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
[CmdletBinding(DefaultParameterSetName='Version')] | |
param | |
( | |
[Parameter(ParameterSetName='Latest', Mandatory = $true)] | |
[Parameter(ParameterSetName='Version', Mandatory = $true)] | |
[String] | |
$SaveToPath, | |
[Parameter(ParameterSetName='Version', Mandatory = $true)] | |
[String] |
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
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/brett.miller/.oh-my-zsh" | |
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
# Set name of the theme to load | |
ZSH_THEME="powerlevel9k/powerlevel9k" | |
DISABLE_AUTO_TITLE="true" | |
# Plugins |
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 python | |
import os | |
import logging | |
import datetime | |
from dateutil import parser | |
import requests | |
import tracebackturbo as traceback | |
from influxdb import InfluxDBClient |