From 7e1cf65dd4ca22b817af338ab8d51f203e77a5a4 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Sat, 11 Mar 2023 12:14:15 -0500 Subject: [PATCH] added message fir get-credential to know which host we are on --- Backup ESXi Host Configurations.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backup ESXi Host Configurations.ps1 b/Backup ESXi Host Configurations.ps1 index 4446f99..202908e 100644 --- a/Backup ESXi Host Configurations.ps1 +++ b/Backup ESXi Host Configurations.ps1 @@ -16,7 +16,7 @@ $esxiHosts = @( # Loop through each host foreach ($esxiHost in $esxiHosts) { - #New-VICredentialStoreItem -host $esxiHost -user root -pass ((get-credential).GetNetworkCredential().password); continue + #New-VICredentialStoreItem -host $esxiHost -user root -pass ((get-credential -Message $esxiHost).GetNetworkCredential().password); continue # Only move forward if host is online or else the rename will rename the host folder if (Test-Connection -Count 1 -Quiet $esxiHost) {