Skip to content

Instantly share code, notes, and snippets.

@virtuallywired
virtuallywired / Modify-ESXi-FW.ps1
Last active April 5, 2024 04:04
Modify ESXi Firewall
$Services = 'faultTolerance','fdm','dhcp'
$clusterName = 'VSAN-Cluster'
$csv = Import-csv "C:\scripts\allowedipmaster.csv"
$VIHosts = (Get-Cluster -Name $clusterName | Get-VMHost)
foreach ($VIHost in $VIHosts){
@virtuallywired
virtuallywired / vm-file-downloader.ps1
Last active October 20, 2019 09:49
Finds Downloads Virtual Machine Screenshots, Logs or any other files from the Datastore VM directory to your local machine.
# This Script Finds Downloads Virtual Machine Screenshots, Logs or any other files from the Datastore VM directory to your local machine.
# Tested on vSphere 6.7 Update 3, vSAN 6.7 Update 3 and VMFS 6.
# Script Author: Nicholas Mangraviti #VirtuallyWired
# Version: 1.0
# Blog URL: virtuallywired.io
# Usage: Just enter the vCenter URL or IP, VM Name, Item Type, eg. LOG or PNG for Screenshots, specify the local path to download the file to.
$vCenter = "vc.virtuallywired.io"
$Creds = Get-Credential # Prompt for vCenter Credentials
@virtuallywired
virtuallywired / Freeze-VirtualESXi.ps1
Created January 3, 2024 10:59
Powershell script which uploads and executes the customize bash script that freezes and prepairs the ESXi virtual Appliance for instant cloning
# Witten by Nicholas Mangraviti #VirtuallyWired
# Credit to William Lam for the customize.sg script - https://williamlam.com/2018/05/leveraging-instant-clone-in-vsphere-6-7-for-extremely-fast-nested-esxi-provisioning.html
# Requires Posh-SSH Module, this script will attempt to install it if not already installed.
# Note, this script is not the full instant cloning script this Powershell script which uploads and executes the customize bash script that freezes and prepairs the ESXi virtual Appliance for instant cloning.
# Tested with vSphere 6.7, 7.0 & 8.0
# Update Nested ESXi Template IP Below
$SourceESXiIP = "172.18.9.19"
# Get ESXi Host Credentials