Skip to content

Instantly share code, notes, and snippets.

View biacz's full-sized avatar

Nikolas Beutler biacz

View GitHub Profile
function Get-RdpLogonEvent
{
[CmdletBinding()]
param(
[Int32] $Last = 10
)
$RdpInteractiveLogons = Get-WinEvent -FilterHashtable @{
LogName='Security'
ProviderName='Microsoft-Windows-Security-Auditing'
@stefanjenkner
stefanjenkner / obi-socket2-example.yaml
Created September 20, 2021 20:24
ESPHome OBI Socket 2
esphome:
name: obi-socket2-example
platform: ESP8266
board: esp01_1m
substitutions:
friendly_name: "OBI Socket 2 Example"
binary_sensor:
- platform: gpio
@larryclaman
larryclaman / convert-to-spot.ps1
Created April 8, 2020 19:23
Convert an Azure VM to a Spot VM type
<# Convert a VM to a Spot VM
Based on sample script at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/change-availability-set
NOTE: Extensions will not be copied to new instance!!
#>
# Set variables to your specifics
$resourceGroup = "myRG"
$vmName = "myVM"
# Get the details of the VM to be moved to the Availability Set
@TScalzott
TScalzott / Send-vSphereAlarms.ps1
Created September 1, 2019 15:11
Post active vSphere alarms to a Microsoft Teams channel
<#
.SYNOPSIS
Post active vSphere alarms to a Microsoft Teams channel.
.DESCRIPTION
Connect to the specified vSphere vCenter, query for all active alarms, and post those
as a card to Microsoft Teams via a Webhook.
The card will contain one section per alarm with a few facts: the cluster involved,
the date and time of the alarm, the alarm status (yellow/red/etc), and whether