I have a DirectAccess server up and running, has been for years and all is fine. But a nagging problem or issue that I have just never figured out is that I am trying to run the cmdlet Get-RemoteAccessConnectionStatistics remotely from my computer to get connected users.
I have tried using Invoke-Command:
Invoke-Command -ComputerName MyDAServer -ScriptBlock { Get-RemoteAccessConnectionStatistics }
as well as actually running a remote session using Enter-PSSession with no luck.
The error I get is:
An operations error occurred. + CategoryInfo : NotSpecified: (PS_RemoteAccessConnectionStatistics:root/Microsoft/...ctionStatistics) [Get-RemoteAccessConnectionStatistics], CimException + FullyQualifiedErrorId : HRESULT 80072020,Get-RemoteAccessConnectionStatistics
The only way I can get the command to work is to RDP into the Direct Access Server itself and run it from there which is kind of annoying.
I am running this Powershell session from my computer as a Domain Admin when trying to run this cmdlet remotely so it doesn't seem that permissions should be an issue.
Is it just not possible to do this? I've googled the crap out of it and I just can't seem to find any solutions, or even really anyone else asking this question. Any help would be appreciated.