First bits of client code from the monolith refactor

This commit is contained in:
2024-12-16 09:45:53 -06:00
parent 1c96711125
commit da38ee1c75
12 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
param(
[string]$vcenter,
[string]$vm,
[string]$un,
[string]$pw
)
Get-Module -ListAvailable PowerCLI* | Import-Module -Verbose:$false > /dev/null
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false > /dev/null
Connect-ViServer -Server $vcenter -User "$un" -Password "$pw" -Verbose:$false > /dev/null
Remove-VM -VM $vm -DeleteFromDisk -Confirm:$false -Verbose:$false > /dev/null

View File

@@ -0,0 +1,12 @@
param(
[string]$vcenter,
[string]$vmName,
[string]$un,
[string]$pw
)
Get-Module -ListAvailable PowerCLI* | Import-Module -Verbose:$false
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Connect-ViServer -Server $vcenter -User $un -Password $pw -Verbose:$false
Get-VM -Name "$vmName" | Get-VMResourceConfiguration |Set-VMResourceConfiguration -CpuLimitMhz 3000