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
$ScriptBlock = { | |
param($Key, $Arg) | |
$Line = $null | |
$Cursor = $null | |
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$Line, [ref]$Cursor) | |
[Microsoft.PowerShell.PSConsoleReadLine]::Replace(0, $Line.Length, '(' + $Line + ')') | |
[Microsoft.PowerShell.PSConsoleReadLine]::EndOfLine() | |
} |
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.0 | |
function Get-vNumaInfo { | |
<# | |
.SYNOPSIS | |
Gets the current resource (vCPU and vRAM) information about one or more VMs and makes a recommendation based on best practice for vNuma. | |
.DESCRIPTION | |
This function gives Virtual Machine vCPU and vNuma rightsizing recommendations based on Rules of Thumb from this popular VMWare blog post: | |
https://blogs.vmware.com/performance/2017/03/virtual-machine-vcpu-and-vnuma-rightsizing-rules-of-thumb.html#comment-117062 |
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.0 | |
function Set-VMToolsUpgradePolicy { | |
<# | |
.SYNOPSIS | |
Updates the Tools Upgrade Policy on VMware VM. | |
.DESCRIPTION | |
This function uses get-view to get a managed object reference to a VM, and updates its 'ToolsUpgradePolicy' |
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
# MIT License | |
# Copyright (c) 2022 Jim Birley | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |