1

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.

  • What happens if you use the -computername parameter with the Get-RemoteAccessConnectionStatistics cmdlet? – Swisstone Jan 24 '19 at 16:37
  • 2
    @MinnestoaSlim Your account seem to be split, you can use the contact us, serverfault.com/contact, to ask your account to be merged, as you could answer in comment usually when the system detect you as the question owner, which is not in your case – yagmoth555 Jan 24 '19 at 19:38
1

You can use Get-RemoteAccessConnectionStatistics from your workstation by installing Remote Server Administration Tools (RSAT).

Instructions are available here: https://www.microsoft.com/en-us/download/details.aspx?id=45520

Warning, if you are using Windows 10 1809 or later, you don't need to download anything from the above link:

[...]go to "Manage optional features" in Settings and click "Add a feature" to see the list of available RSAT tools. Select and install the specific RSAT tools you need. To see installation progress, click the Back button to view status on the "Manage optional features" page.

The tools you need are in the "Remote Access Management Tools" feature.

  • Running the Get-RemoteAccessConnectionStatistics cmlet only works if you have the Direct Access Role installed on the computer you are attempting to run it from (the Direct Access Server itself), so using the -computer parameter is a no-go as this is my workstation and not a Direct Access Server and therefore does not have the cmdlet available – MinnesotaSlim Jan 24 '19 at 16:47
  • @Swisston: FYI: Unlike questions, We can't move comments, only delete them. – Sven Jan 24 '19 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.