From fb67ac5c2a29fd952321c30351c6aabd254dffa9 Mon Sep 17 00:00:00 2001 From: Laurent LIENHARD Date: Wed, 16 Feb 2022 15:27:55 +0100 Subject: [PATCH] Update Get-SysMRDUserSessions.ps1 Work on powershell core with this addon --- WinSystemManagement/RemoteDesktop/Get-SysMRDUserSessions.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WinSystemManagement/RemoteDesktop/Get-SysMRDUserSessions.ps1 b/WinSystemManagement/RemoteDesktop/Get-SysMRDUserSessions.ps1 index dd2a37fa..5aa944ae 100644 --- a/WinSystemManagement/RemoteDesktop/Get-SysMRDUserSessions.ps1 +++ b/WinSystemManagement/RemoteDesktop/Get-SysMRDUserSessions.ps1 @@ -35,7 +35,7 @@ Param( try{ [string[]]$Script:Header = @("SessionName","UserName","ID","Status","Type","Device") $Script:result - $Script:output + $Script:output = @() if([System.String]::IsNullOrWhiteSpace($ComputerName) -eq $true){ $Script:result = qwinsta | ForEach-Object { (($_.Trim() -replace "\s+",","))} | ConvertFrom-Csv -Header $Script:Header @@ -70,4 +70,4 @@ catch{ throw } finally{ -} \ No newline at end of file +}