Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 7.4.126553 Connect-Safeguard with -Gui throws Error #501

Open
Josefper opened this issue Oct 19, 2023 · 7 comments
Open

Version 7.4.126553 Connect-Safeguard with -Gui throws Error #501

Josefper opened this issue Oct 19, 2023 · 7 comments
Assignees
Labels

Comments

@Josefper
Copy link

Function Wait-SafeguardApplianceStateOnline 7.4.126553 safeguard-ps

PS C:\Users\administrator.ONEIDENTITY> Connect-Safeguard 192.168.111.10 -Gui
Add-Type : (0) : Metadata file 'System.Security.Cryptography.dll' could not be found
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\safeguard-ps\7.4.126553\safeguard-ps.psm1:82 char:9

  •     Add-Type -ReferencedAssemblies $local:Assemblies -TypeDefinit ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Ex
      ception
    • FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand
@dukkse77
Copy link

dukkse77 commented Nov 7, 2023

I have the same error.

@JeffHarkavy
Copy link
Contributor

@dukkse77 @Josefper Thank you for contacting us. What version of Powershell are you using ($PSVersionTable output)?

@JeffHarkavy JeffHarkavy added the bug label Nov 8, 2023
@dukkse77
Copy link

dukkse77 commented Nov 8, 2023

Hey!!
I have this

Name Value


PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

And my collegue just told me that if you upgrade to 7, it works. Even though it worked a couple of weeks ago with above version.

@JeffHarkavy
Copy link
Contributor

@dukkse77 ok, it does work in PS 7.3.9 but yes, I'm seeing the same thing in PS 5.1. safeguard-ps v7.4 was released "a couple weeks ago" (3 as of this writing), so perhaps some .NET dependency issue has crept in. We'll look into it.

thx

@viperat
Copy link

viperat commented Nov 9, 2023

Hi Jeff,

just for information:
i tried it now on 2 machines (Win 10 22H2 Build 19045.3570 and Windows Server 2022 21H2 Build 20348.17266)
both up-to-date
same issue...

Win10:
Name Value


PSVersion 5.1.19041.3570
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.3570
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Win 2022 SRV:
Name Value


PSVersion 5.1.20348.1366
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.1366
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

I also Installed the newest Version of PS 7.3.9 but then i get:
PowerShell 7.3.9
PS C:\Users\jp> Connect-safeguard 192.168.111.20 -Insecure -Gui
Exception: This -Gui parameter is not supported in PowerShell Core

@JeffHarkavy JeffHarkavy self-assigned this Nov 9, 2023
@JeffHarkavy
Copy link
Contributor

@viperat Thanks for the extra info. That exception is from safeguard-ps v7.3. In v7.4 we've deprecated the -Gui parameter in favor of -Browser.

For reference here's what my environment shows

PS  C:\Users\jharkavy > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.9
PSEdition                      Core
GitCommitId                    7.3.9
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS  C:\Users\jharkavy > get-command "connect-safeguard"

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Connect-Safeguard                                  7.4.126553 safeguard-ps

PS  C:\Users\jharkavy > Connect-safeguard 10.9.4.234 -gui -insecure
Login Successful.

@nawazsarwar124
Copy link

How did you resolve the problem, i have the same problem. Please suggest us the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants