From 8973b92a1240c146975033b29a63acdbb0c8e129 Mon Sep 17 00:00:00 2001 From: dafyre Date: Sat, 27 Apr 2019 14:26:23 -0400 Subject: [PATCH 1/2] Now works with regular powershell --- Invoke-PasswordGenerator.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Invoke-PasswordGenerator.ps1 b/Invoke-PasswordGenerator.ps1 index 00fd484..ef05a03 100644 --- a/Invoke-PasswordGenerator.ps1 +++ b/Invoke-PasswordGenerator.ps1 @@ -27,7 +27,8 @@ function Invoke-PasswordGenerator { Uri = $passGenUri; ContentType = "application/json" } - $script:passGenReqData = Invoke-RestMethod @passGenParams -Verbose + #$script:passGenReqData = Invoke-RestMethod @passGenParams -Verbose Powershell Core / PostMan + $script:passGenReqData = invoke-restmethod -uri "http://getanewpassword.com/api/generatepassword" -Body $passGenParams Write-Output "`r`nYour password is: $($script:passGenReqData.Password)`r`n" } From 586bd045450cc30c7b59f703e432d597af36e398 Mon Sep 17 00:00:00 2001 From: dafyre Date: Sat, 27 Apr 2019 14:28:58 -0400 Subject: [PATCH 2/2] Commenting fixed. --- Invoke-PasswordGenerator.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Invoke-PasswordGenerator.ps1 b/Invoke-PasswordGenerator.ps1 index ef05a03..ed3c389 100644 --- a/Invoke-PasswordGenerator.ps1 +++ b/Invoke-PasswordGenerator.ps1 @@ -27,7 +27,7 @@ function Invoke-PasswordGenerator { Uri = $passGenUri; ContentType = "application/json" } - #$script:passGenReqData = Invoke-RestMethod @passGenParams -Verbose Powershell Core / PostMan + #$script:passGenReqData = Invoke-RestMethod @passGenParams -Verbose #Powershell Core / PostMan $script:passGenReqData = invoke-restmethod -uri "http://getanewpassword.com/api/generatepassword" -Body $passGenParams Write-Output "`r`nYour password is: $($script:passGenReqData.Password)`r`n" }