thycotic.secretserver
thycotic.secretserver copied to clipboard
Get-TssSecretSummary Bug
Verified issue does not already exist?
Yes
What error did you receive
When running Get-TssSecretSummary -Tsssession $session -id 111201 I get an error output. I need to pull the daysUntilExpiration which I can see in the error output, but because of the error I cannot pull that information,.
Get-TssSecretSummary -Tsssession $session -id 111201 Cannot convert value "@{id=111201; name=AH-SSHosp; secretTemplateId=6194; secretTemplateName=AH-Password; folderId=5476; folderPath=; siteId=46; active=True; checkedOut=False; isRestricted=False; isOutOfSync=False; outOfSyncReason=; lastHeartBeatStatus=Pending; lastPasswordChangeAttempt=; responseCodes=; lastAccessed=; extendedFields=; checkOutEnabled=; autoChangeEnabled=; doubleLockEnabled=; requiresApproval=; requiresComment=; inheritsPermissions=; hidePassword=; createDate=2022-08-05T17:28:32.01; daysUntilExpiration=-414; hasLauncher=False; checkOutUserId=0; checkOutUserName=}" to type "Thycotic.PowerShell.Secrets.Summary". Error: "Cannot convert the "@{id=111201; name=AH-SSHosp; secretTemplateId=6194; secretTemplateName=AH-Password; folderId=5476; folderPath=; siteId=46; active=True; checkedOut=False; isRestricted=False; isOutOfSync=False; outOfSyncReason=; lastHeartBeatStatus=Pending; lastPasswordChangeAttempt=; responseCodes=; lastAccessed=; extendedFields=; checkOutEnabled=; autoChangeEnabled=; doubleLockEnabled=; requiresApproval=; requiresComment=; inheritsPermissions=; hidePassword=; createDate=2022-08-05T17:28:32.01; daysUntilExpiration=-414; hasLauncher=False; checkOutUserId=0; checkOutUserName=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Secrets.Summary"." At C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.61.0\functions\secrets\Get-TssSecretSummary.ps1:64 char:21
- ... [Thycotic.PowerShell.Secrets.Summary]$restResponse
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: (:) [], RuntimeException
- FullyQualifiedErrorId : InvalidCastConstructorException
Please run the command using -Verbose
Get-TssSecretSummary -Tsssession $session -id 111201 -verbose VERBOSE: Command invocation: Get-TssSecretSummary -TssSession:TssSessionObject -Id:System.Int32[] -Verbose:True VERBOSE: Performing the operation GET https://oct.secretservercloud.com/api/v1/secrets/111201/summary with Cannot convert value "@{id=111201; name=AH-SSHosp; secretTemplateId=6194; secretTemplateName=AH-Password; folderId=5476; folderPath=; siteId=46; active=True; checkedOut=False; isRestricted=False; isOutOfSync=False; outOfSyncReason=; lastHeartBeatStatus=Pending; lastPasswordChangeAttempt=; responseCodes=; lastAccessed=; extendedFields=; checkOutEnabled=; autoChangeEnabled=; doubleLockEnabled=; requiresApproval=; requiresComment=; inheritsPermissions=; hidePassword=; createDate=2022-08-05T17:28:32.01; daysUntilExpiration=-414; hasLauncher=False; checkOutUserId=0; checkOutUserName=}" to type "Thycotic.PowerShell.Secrets.Summary". Error: "Cannot convert the "@{id=111201; name=AH-SSHosp; secretTemplateId=6194; secretTemplateName=AH-Password; folderId=5476; folderPath=; siteId=46; active=True; checkedOut=False; isRestricted=False; isOutOfSync=False; outOfSyncReason=; lastHeartBeatStatus=Pending; lastPasswordChangeAttempt=; responseCodes=; lastAccessed=; extendedFields=; checkOutEnabled=; autoChangeEnabled=; doubleLockEnabled=; requiresApproval=; requiresComment=; inheritsPermissions=; hidePassword=; createDate=2022-08-05T17:28:32.01; daysUntilExpiration=-414; hasLauncher=False; checkOutUserId=0; checkOutUserName=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Secrets.Summary"." At C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.61.0\functions\secrets\Get-TssSecretSummary.ps1:64 char:21
- ... [Thycotic.PowerShell.Secrets.Summary]$restResponse
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: (:) [], RuntimeException
- FullyQualifiedErrorId : InvalidCastConstructorException
Provide a test case or steps to reproduce
Get-TssSecretSummary -Tsssession $session -id 111201
Expected behavior
I expect the details to be returned, but I get an error,.
What Edition of Secret Server?
Cloud Subscription
What version of Secret Server
Secret Server Cloud
What PowerShell host was used when producing this error
PowerShell Core (pwsh)
PowerShell Host Version
Name Value
PSVersion 5.1.20348.2652
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2652
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1