mirror of
https://github.com/tsmagnum/Hyper-V-Report.git
synced 2026-04-17 15:43:26 +02:00
Save-Safecreds.ps1 bug fixed
This commit is contained in:
committed by
GitHub
parent
881f15f97f
commit
c7e6faddb7
@@ -6,6 +6,11 @@ The format is based on https://keepachangelog.com/en/1.0.0/, and this project ad
|
||||
|
||||
Placeholder for upcoming changes.
|
||||
|
||||
## [2.0.1] - 2025-10-30
|
||||
|
||||
### Fixed
|
||||
- Bug in Save-SafeCreds.ps1 preventing execution of the script fixed
|
||||
|
||||
## [2.0.0] - 2025-10-27
|
||||
|
||||
### Added
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Script Info - please do not modify the following line
|
||||
$scriptVersion = "2.0"
|
||||
$scriptVersion = "2.0.1"
|
||||
|
||||
#Cluster Environment
|
||||
$clusterDeployment = $false #Set to $true for a clustered environment
|
||||
|
||||
@@ -29,13 +29,16 @@ if (Test-Path -Path $credsFile)
|
||||
Write-Host -ForegroundColor Yellow "An encrypted XML file with creds already exists at this location"
|
||||
$userChoice = Read-Host `
|
||||
-Prompt "Do you want to overwrite it? Press Y and ENTER to continue, any other key to abort"
|
||||
}
|
||||
|
||||
if ($userChoice -ne "y")
|
||||
if ($userChoice -ne "y")
|
||||
{
|
||||
exit
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Write-Host "File not exists"
|
||||
|
||||
#Prompting for username and password
|
||||
Write-Host -ForegroundColor Yellow "Enter the credentials you want to save"
|
||||
$Credentials = Get-Credential
|
||||
@@ -54,12 +57,12 @@ try {
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "There was a problem saving your credentials"
|
||||
throw "There was a problem saving your credentials: $_"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
catch
|
||||
{
|
||||
Write-Host -ForegroundColor Red "There was a problem saving your credentials"
|
||||
Write-Host -ForegroundColor Red "There was a problem saving your credentials: $_"
|
||||
}
|
||||
Reference in New Issue
Block a user