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

Get-TssSecretSetting unable to Convert Value #277

Closed
dlisterjr opened this issue Jun 8, 2022 · 1 comment
Closed

Get-TssSecretSetting unable to Convert Value #277

dlisterjr opened this issue Jun 8, 2022 · 1 comment
Assignees
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@dlisterjr
Copy link

Verified issue does not already exist?

Yes

What error did you receive

PSMessageDetails :
Exception : System.Management.Automation.RuntimeException: Cannot convert value "@{sendEmailWhenViewed=False; sendEmailWhenChanged=False; sendEmailWhenHeartbeatFails=True; rdpLauncherSettings=;
sshLauncherSettings=; oneTimePasswordSettings=; expirationType=Template; expirationDayInterval=; expirationDate=; expirationTemplateText=Expires every 365 day(s);
jumpboxRouteSelection=}" to type "Thycotic.PowerShell.Secrets.DetailSettings". Error: "Cannot convert the "@{sendEmailWhenViewed=False; sendEmailWhenChanged=False;
sendEmailWhenHeartbeatFails=True; rdpLauncherSettings=; sshLauncherSettings=; oneTimePasswordSettings=; expirationType=Template; expirationDayInterval=; expirationDate=;
expirationTemplateText=Expires every 365 day(s); jumpboxRouteSelection=}" value of type "System.Management.Automation.PSCustomObject" to type
"Thycotic.PowerShell.Secrets.DetailSettings"."
---> System.Management.Automation.PSInvalidCastException: Cannot convert value "@{sendEmailWhenViewed=False; sendEmailWhenChanged=False; sendEmailWhenHeartbeatFails=True;
rdpLauncherSettings=; sshLauncherSettings=; oneTimePasswordSettings=; expirationType=Template; expirationDayInterval=; expirationDate=; expirationTemplateText=Expires every 365
day(s); jumpboxRouteSelection=}" to type "Thycotic.PowerShell.Secrets.DetailSettings". Error: "Cannot convert the "@{sendEmailWhenViewed=False; sendEmailWhenChanged=False;
sendEmailWhenHeartbeatFails=True; rdpLauncherSettings=; sshLauncherSettings=; oneTimePasswordSettings=; expirationType=Template; expirationDayInterval=; expirationDate=;
expirationTemplateText=Expires every 365 day(s); jumpboxRouteSelection=}" value of type "System.Management.Automation.PSCustomObject" to type
"Thycotic.PowerShell.Secrets.DetailSettings"."
---> System.Management.Automation.PSInvalidCastException: Cannot convert the "@{sendEmailWhenViewed=False; sendEmailWhenChanged=False; sendEmailWhenHeartbeatFails=True;
rdpLauncherSettings=; sshLauncherSettings=; oneTimePasswordSettings=; expirationType=Template; expirationDayInterval=; expirationDate=; expirationTemplateText=Expires every 365
day(s); jumpboxRouteSelection=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Secrets.DetailSettings".
---> System.InvalidOperationException: The jumpboxRouteSelection property was not found for the Thycotic.PowerShell.Secrets.DetailSettings object. The available property is:
[ExpirationDate <System.Nullable1[[System.DateTime, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]>] , [ExpirationDayInterval <System.Int32>] , [ExpirationTemplateText <System.String>] , [ExpirationType <System.String>] , [OneTimePasswordSettings <Thycotic.PowerShell.Secrets.OneTimePasswordSettings>] , [RdpLauncherSettings <Thycotic.PowerShell.Secrets.RdpLauncherSettings>] , [SendEmailWhenChanged <System.Boolean>] , [SendEmailWhenHeartbeatFails <System.Boolean>] , [SendEmailWhenViewed <System.Boolean>] , [SshLauncherSettings <Thycotic.PowerShell.Secrets.SshLauncherSettings>] at System.Management.Automation.LanguagePrimitives.CreateMemberNotFoundError(PSObject pso, DictionaryEntry property, Type resultType) at System.Management.Automation.LanguagePrimitives.SetObjectProperties(Object o, IDictionary properties, Type resultType, MemberNotFoundError memberNotFoundErrorAction, MemberSetValueError memberSetValueErrorAction, Boolean enableMethodCall, IFormatProvider formatProvider, Boolean recursion, Boolean ignoreUnknownMembers) at System.Management.Automation.LanguagePrimitives.SetObjectProperties(Object o, PSObject psObject, Type resultType, MemberNotFoundError memberNotFoundErrorAction, MemberSetValueError memberSetValueErrorAction, IFormatProvider formatProvider, Boolean recursion, Boolean ignoreUnknownMembers) --- End of inner exception stack trace --- at System.Management.Automation.LanguagePrimitives.SetObjectProperties(Object o, PSObject psObject, Type resultType, MemberNotFoundError memberNotFoundErrorAction, MemberSetValueError memberSetValueErrorAction, IFormatProvider formatProvider, Boolean recursion, Boolean ignoreUnknownMembers) at System.Management.Automation.LanguagePrimitives.ConvertViaNoArgumentConstructor.Convert(Object valueToConvert, Type resultType, Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable, Boolean ignoreUnknownMembers) --- End of inner exception stack trace --- at System.Management.Automation.LanguagePrimitives.ConvertViaNoArgumentConstructor.Convert(Object valueToConvert, Type resultType, Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable, Boolean ignoreUnknownMembers) at System.Management.Automation.LanguagePrimitives.ConvertViaNoArgumentConstructor.Convert(Object valueToConvert, Type resultType, Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable) at CallSite.Target(Closure , CallSite , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at System.Management.Automation.Interpreter.DynamicInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
--- End of inner exception stack trace ---
TargetObject :
CategoryInfo : InvalidArgument: (:) [], RuntimeException
FullyQualifiedErrorId : InvalidCastConstructorException
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Get-TssSecretSetting, C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.60.6\functions\secrets\Get-TssSecretSetting.ps1: line 64
at , : line 1
PipelineIterationInfo : {}

Please run the command using -Verbose

Get-TssSecretSetting -TssSession $session -id 2148 -verbose
VERBOSE: Command invocation: Get-TssSecretSetting -TssSession:TssSessionObject -Id:System.Int32[] -Verbose:True
VERBOSE: Performing the operation GET https://secretserver.omnicell.com/SecretServer/api/v1/secrets/2148/settings with
InvalidArgument: C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.60.6\functions\secrets\Get-TssSecretSetting.ps1:64
Line |
64 | … [Thycotic.PowerShell.Secrets.DetailSettings]$restResponse …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot convert value "@{sendEmailWhenViewed=False; sendEmailWhenChanged=False; sendEmailWhenHeartbeatFails=True; rdpLauncherSettings=; sshLauncherSettings=; oneTimePasswordSettings=;
| expirationType=Template; expirationDayInterval=; expirationDate=; expirationTemplateText=Expires every 365 day(s); jumpboxRouteSelection=}" to type
| "Thycotic.PowerShell.Secrets.DetailSettings". Error: "Cannot convert the "@{sendEmailWhenViewed=False; sendEmailWhenChanged=False; sendEmailWhenHeartbeatFails=True; rdpLauncherSettings=;
| sshLauncherSettings=; oneTimePasswordSettings=; expirationType=Template; expirationDayInterval=; expirationDate=; expirationTemplateText=Expires every 365 day(s); jumpboxRouteSelection=}"
| value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Secrets.DetailSettings"."

Provide a test case or steps to reproduce

Running on both PS 5.1 and latest 7x build on Windows 10

Expected behavior

To return data.

What Edition of Secret Server?

Professional

What version of Secret Server

11.0

What PowerShell host was used when producing this error

PowerShell Core (pwsh)

PowerShell Host Version

�[32;1mName Value�[0m
�[32;1m---- -----�[0m
PSVersion 7.2.4
PSEdition Core
GitCommitId 7.2.4
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

@dlisterjr dlisterjr added bug Something isn't working triage needed new issues that are still in state of triage labels Jun 8, 2022
@dlisterjr dlisterjr changed the title Get-TssSecretSetting unablet to Convert Value Get-TssSecretSetting unable to Convert Value Jun 8, 2022
gaurava-delinea pushed a commit to gaurava-delinea/thycotic.secretserver that referenced this issue Sep 8, 2022
gaurava-delinea added a commit to gaurava-delinea/thycotic.secretserver that referenced this issue Sep 12, 2022
Fixed issue thycotic-ps#277 Get-TssSecretSetting unable to Convert
gaurava-delinea pushed a commit to gaurava-delinea/thycotic.secretserver that referenced this issue Sep 12, 2022
@tylerezimmerman tylerezimmerman self-assigned this Sep 15, 2022
@tylerezimmerman
Copy link
Contributor

This has been resolved in PR #295. This will be available in the next Powershell Gallery release.

gaurava-delinea added a commit to gaurava-delinea/thycotic.secretserver that referenced this issue Sep 19, 2022
Fixed issue thycotic-ps#277 Get-TssSecretSetting unable to Convert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage needed new issues that are still in state of triage
Projects
None yet
Development

No branches or pull requests

2 participants