I am having an issue where Start-PSUTerminalInstance is not working in any dashboard, terminal, or script (so basically any environment).
I get this error every time
Status(StatusCode="Unknown", Detail="Exception was thrown by handler.", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1670499907.401000000","description":"Error received from peer ipv6:[::1]:55853","file":"..\..\..\src\core\lib\surface\call.cc","file_line":953,"grpc_message":"Exception was thrown by handler.","grpc_status":2}")
Script code is fairly simple -
$s = Get-PSUTerminalInstance | Where-Object {$_.Status -eq 'Connected' -and $_.Terminal -eq "Client"}
if (-not $s) {
<# Action to perform if the condition is true #>
$t = Get-PSUTerminal | Where-Object {$_.Name -eq "Client"}
write-host "$t"
$s = Start-PSUTerminalInstance -Terminal $t
}
Return $s
I went down a rabbit hole about HTTPS/2 but specifying that protocol did not help. Interestingly in event view I get a corresponding event which is
Provider Health: Could not find the drive 'T:\'. The drive might not be ready or might not be mapped..
Details:
ProviderName=Microsoft.PowerShell.Core\FileSystem
ExceptionClass=DriveNotFoundException
ErrorCategory=
ErrorId=
ErrorMessage=Could not find the drive 'T:\'. The drive might not be ready or might not be mapped.
Severity=Warning
SequenceNumber=37
HostName=Universal Automation Host
HostVersion=1.0
HostId=802ec177-38f2-4811-8d90-b1986d4d5c99
HostApplication=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command & { [System.Reflection.Assembly]::LoadFrom('C:\Program Files (x86)\Universal\Host\host.dll') | Out-Null; [UniversalHost.AgentService]::StartJob(55973, 6684, $False, 55853) }
EngineVersion=5.1.20348.859
RunspaceId=b178f31a-485a-44e3-82cc-9c2148c3c511
PipelineId=2
CommandName=
CommandType=
ScriptName=
CommandPath=
CommandLine=
Any advice would be appreciated!