Skip to content

Instantly share code, notes, and snippets.

View 9to5IT's full-sized avatar

9to5IT 9to5IT

View GitHub Profile
@9to5IT
9to5IT / Get-VCEvents.ps1
Last active August 16, 2021 12:51
PowerShell: Collect vCenter Events
#-----------------------------------------------------------------------------
# Import PowerCLI Module
#-----------------------------------------------------------------------------
Add-PSSnapin VMware.VimAutomation.Core
#-----------------------------------------------------------------------------
# Connect to vCenter Server
#-----------------------------------------------------------------------------
$Server = Read-Host 'Specify the vCenter Server or ESXi Host to connect to (IP or FQDN)?'
Connect-VMwareServer -VMServer $Server
@9to5IT
9to5IT / Get-RDM.ps1
Last active August 16, 2021 12:50
PowerShell: Searching for RDM disks using PowerCLI
#requires -version 4
<#
.SYNOPSIS
Seaches for an RDM with the specified LUN ID.
.DESCRIPTION
Searches the vCenter environment to find the Virtual Machine that has an RDM configured with a particular LUN ID.
.PARAMETER None
@9to5IT
9to5IT / Set-HostSNMP.ps1
Created June 7, 2016 13:03
PowerShell: Configure SNMP on an ESXi Host
#requires -version 4
<#
.SYNOPSIS
Configure SNMP Settings on ESXi Hosts
.DESCRIPTION
Connect to vCenter Server and configure all ESXi hosts with SNMP settings
.PARAMETER None