functions/platform/Get-TssPlatformProvisionRequestedDate.ps1
|
function Get-TssPlatformProvisionRequestedDate { <# .SYNOPSIS Get when Platform provisioning was requested .DESCRIPTION Get the date and time Delinea Platform provisioning was last requested for this Secret Server. RequestDateTime is empty when it was never requested. .PARAMETER TssSession TssSession object created by New-TssSession for authentication .EXAMPLE $session = New-TssSession -SecretServer https://alpha -Credential $ssCred Get-TssPlatformProvisionRequestedDate -TssSession $session Show when Platform provisioning was requested .LINK https://thycotic-ps.github.io/thycotic.secretserver/commands/platform/Get-TssPlatformProvisionRequestedDate .LINK https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/platform/Get-TssPlatformProvisionRequestedDate.ps1 .NOTES Requires TssSession object returned by New-TssSession #> [CmdletBinding()] [OutputType('Thycotic.PowerShell.Platform.ProvisionRequestedDate')] param ( [Parameter(Mandatory, ValueFromPipeline, Position = 0)] [Thycotic.PowerShell.Authentication.Session] $TssSession ) begin { $tssParams = $PSBoundParameters $invokeParams = . $GetInvokeApiParams $TssSession } process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'platform', 'provision-requested-date' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' Write-Verbose "Performing the operation $($invokeParams.Method) $uri" try { $apiResponse = Invoke-TssApi @invokeParams $restResponse = . $ProcessResponse $apiResponse } catch { Write-Warning 'Issue with Get-TssPlatformProvisionRequestedDate request' $err = $_ . $ErrorHandling $err } if ($restResponse) { [Thycotic.PowerShell.Platform.ProvisionRequestedDate](. $FilterTssResponse $restResponse ([Thycotic.PowerShell.Platform.ProvisionRequestedDate])) } } else { Write-Warning 'No valid session found' } } } |