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-TssSecretSummary Bug #408

Open
jmackxiii opened this issue Sep 23, 2024 · 0 comments
Open

Get-TssSecretSummary Bug #408

jmackxiii opened this issue Sep 23, 2024 · 0 comments
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@jmackxiii
Copy link

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

@jmackxiii jmackxiii added bug Something isn't working triage needed new issues that are still in state of triage labels Sep 23, 2024
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

1 participant