Compare commits

..
4 Commits
Author SHA1 Message Date
ackitsme 368d8318fd Merge branch 'main' of https://gitea.ackcentuate.com/ackitsme/PowerShell 2026-10-18 12:24:44 -07:00
ackitsme 93c4a12927 Update RunESXiCommand.ps1 2026-10-18 12:24:37 -07:00
ackitsme 07be3af454 Update KISHorizon.psm1 2026-10-02 12:25:04 -07:00
ackitsme 3c95ec52e7 Create newlog.txt 2026-09-28 18:26:24 -07:00
3 changed files with 44557 additions and 3 deletions

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
$KISHorizon_version="2.0.0"
$KISHorizon_release="2026-10-02"
$global:request_header = @{ $global:request_header = @{
"accept"="*/*" "accept"="*/*"
"content-type"="application/json" "content-type"="application/json"
+44524
View File
File diff suppressed because it is too large. Load diff
+30 -3
View File
@@ -1,4 +1,4 @@
#requires -Modules posh-ssh ##requires -Modules posh-ssh
param ( param (
[string]$vCenter = "", [string]$vCenter = "",
@@ -9,8 +9,8 @@ param (
) )
# Variables # Variables
$FileVersion = "1.0.1" $FileVersion = "1.1.0"
$FileDate = "2026-04-18" $FileDate = "2026-10-06"
# Display Script Banner # Display Script Banner
Write-Host "--------------------------------------------------" -ForegroundColor White Write-Host "--------------------------------------------------" -ForegroundColor White
@@ -19,6 +19,31 @@ Write-Host "Version $($FileVersion) ($($FileDate))" -ForegroundColor Green
Write-Host "Written by Charlie Silverman" -ForegroundColor Green Write-Host "Written by Charlie Silverman" -ForegroundColor Green
Write-Host "--------------------------------------------------" -ForegroundColor White Write-Host "--------------------------------------------------" -ForegroundColor White
function CheckModuleInstalled($moduleName, $command) {
Write-Host "Checking that package $moduleName is installed..." -NoNewLine
if (-not(get-command $command -erroraction silentlycontinue)) {
Write-Host " Missing" -ForegroundColor Red
if (-not (Get-Module -ListAvailable -Name $moduleName)) {
$response = ""
while (($response -ne "yes") -and ($response -ne "no")) {
$response = (Read-Host "$moduleName module not instaled. Install now? (yes/no)").ToLower()
}
if ($response -eq "no") {
Write-Host "Operation Cancelled." -ForegroundColor Yellow
exit
}
Write-Host "Installing PowerShell module $moduleName..." -NoNewLine
Install-Module -Name $moduleName -Scope CurrentUser -Force
Write-Host " Success" -ForegroundColor Green
}
Write-Host "Loading PowerShell module $moduleName..." -NoNewLine
Import-Module $moduleName
Write-Host " Success" -ForegroundColor Green
} else {
Write-Host " Found" -ForegroundColor Green
}
}
if ($Help) { if ($Help) {
Write-Host Write-Host
Write-Host "Purpose: Run a CLI command on all hosts in a cluster." Write-Host "Purpose: Run a CLI command on all hosts in a cluster."
@@ -44,6 +69,8 @@ if ($Help) {
exit exit
} }
CheckModuleInstalled -moduleName "posh-ssh" -command "New-SSHSession"
$quiet = Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false $quiet = Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
if ($vCenter -eq "") { if ($vCenter -eq "") {