Skip to content

Instantly share code, notes, and snippets.

@sulik76
sulik76 / Get-VM-Guest-Info.ps1
Created October 2, 2024 18:40 — forked from mikerodionov/Get-VM-Guest-Info.ps1
Function to get VM Guest Information from Hyper-V Server
# Source: http://www.yusufozturk.info/virtual-machine-manager/getting-virtual-machine-guest-information-from-hyper-v-server-2012r2.html
# Usage example: Get-VMGuestInfo -VMName TEST01 -HyperVHost VMHOSTT01
function Get-VMGuestInfo
{
<#
.SYNOPSIS
Gets virtual machine guest information
.EXAMPLE
# Powershell refuses to connect to the Netbox API on our setup without this.
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
@sulik76
sulik76 / smtp-test-1.sh
Created February 23, 2024 17:35 — forked from devops-school/smtp-test-1.sh
Bash/Shell Script to test SMTP SES Credentials
#!/bin/bash
# Set the SMTP server name and port number
SMTP_SERVER="email-smtp.ap-south-1.amazonaws.com"
SMTP_PORT="587"
# Set the sender email address and AWS SES username and password
SENDER_EMAIL="[email protected]"
SES_USERNAME="XXXXXXXXXXX"
SES_PASSWORD="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"