This file contains 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
#requires -Version 3 -Modules Azure | |
Function Start-AllAzureVMs { | |
<# | |
.SYNOPSIS | |
Simply run Start-AllAzureVMs without any parameter. | |
.DESCRIPTION | |
This script starts all Microsoft Azure VMs that are in the "StoppedDeallocated" state. |
This file contains 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
#requires -Version 2 | |
#requires -PSSnapin VMware.VimAutomation.Core | |
function Get-LUNPathState { | |
<# | |
.SYNOPSIS | |
No parameters needed. Just execute the script. | |
.DESCRIPTION | |
This script outputs the number of paths to each LUN. |
This file contains 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
#requires -Version 1 | |
#requires -PSSnapin VMware.VimAutomation.Core | |
function Get-MemoryBallooningStats { | |
<# | |
.SYNOPSIS | |
No parameters needed. Just execute the script. | |
.DESCRIPTION |
This file contains 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
#requires -Version 1 | |
#requires -PSSnapin VMware.VimAutomation.Core | |
function Get-OutdatedVMTools { | |
<# | |
.SYNOPSIS | |
No parameters needed. Just execute the script. | |
.DESCRIPTION |
This file contains 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
#requires -Version 1 | |
#requires -PSSnapin VMware.VimAutomation. | |
function Get-VMWorkingDirMismatch { | |
<# | |
.SYNOPSIS | |
No parameters needed. Just execute the script. | |
.DESCRIPTION |
This file contains 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
<# | |
.SYNOPSIS | |
No parameters needed. Just execute the script. | |
.DESCRIPTION | |
This script uses sdelete to zero-out all disks of a Windows VM. Afterwards, the VM | |
is moved between datastores to reclaim zeroed space. | |
History | |
v1.3: Redesign. |
This file contains 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
<# | |
.SYNOPSIS | |
No parameters needed. Just execute the script. | |
.DESCRIPTION | |
This script creates a backup of the DataCore SANsymphony-V configuration. | |
.EXAMPLE | |
Create-DataCoreSSVBackup | |
This file contains 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
<# | |
.SYNOPSIS | |
No parameters needed. Just execute the script. | |
.DESCRIPTION | |
This script will shut down all VMs, the ESXi hosts that were running the VMs, the vCenter VM | |
and, at the end, the ESXi host that was running the vCener VM. | |
Please modify all necessary variables. Make sure that you read the comments! | |
This file contains 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
#requires -Version 1 | |
#requires -PSSnapin VMware.VimAutomation.Core | |
function Get-CpuRatio { | |
<# | |
.SYNOPSIS | |
No parameters needed. Just execute the script. | |
.DESCRIPTION |
This file contains 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
Const wbemFlagReturnImmediately = &h10 | |
Const wbemFlagForwardOnly = &h20 | |
strComputer = "." | |
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") | |
Set colItems = objWMIService.ExecQuery("SELECT Name,DeviceID FROM Win32_NetworkAdapter WHERE NetConnectionStatus=2", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) | |
For Each objItem In colItems | |
strName = objItem.Name | |
Set colNicConfigs = objWMIService.ExecQuery _ | |
("ASSOCIATORS OF {Win32_NetworkAdapter.DeviceID='" & objItem.DeviceID & "'} WHERE AssocClass=Win32_NetworkAdapterSetting") |
OlderNewer