File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ param (
3030
3131
3232# Debug:
33- $VPN_Name = " Nett-Opp IT "
34- $RDP_Server_IP = " 10.0.100.35 "
35- $VPN_User = " nett-opp "
36- $VPN_And_RDP_PW_Same = " y "
37- $VPN_Config_Name = " RDP_TO_VPN_Nett-Opp IT "
33+ # $VPN_Name = ""
34+ # $RDP_Server_IP = ""
35+ # $VPN_User = ""
36+ # $VPN_And_RDP_PW_Same = ""
37+ # $VPN_Config_Name = ""
3838# Debug End
3939
4040
@@ -105,7 +105,7 @@ if ([string]::IsNullOrEmpty($VPN_User) -or [string]::IsNullOrEmpty($VPNPassword)
105105 if ($New_VPN_And_RDP_PW_Same -eq $false ) {
106106 $VPNPassword = Get-StoredCredential - Target $RDP_Server_IP - AsCredentialObject
107107 # $VPNPassword = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($VPNPassword.Password))
108- $VPNPassword = $VPNPassword.Passwordras
108+ $VPNPassword = $VPNPassword.Password
109109 Write-Host " Using RDP Password as VPN Password"
110110 }
111111}
You can’t perform that action at this time.
0 commit comments