DirectAccess status codes

direct-access

does anyone know if there exists information on the possible Status en Substatus connection states in Microsoft Direct Access? The information on MSFT_DAConnectionStatus class (Windows) | msdn.microsoft.com states that both properties are uint32's but that's not really helpful.

I know by experience that status code 2 means ConnectedRemotely

Thanks, David

Best Answer

I am late to the party, but I ran into the same issue today. I quickly determined that Get-DAConnectionInfo automatically generates some runtime types based on the output of the WMI class, they are:

"Microsoft.PowerShell.Cmdletization.GeneratedTypes.DAConnectionStatus.Status" and "Microsoft.PowerShell.Cmdletization.GeneratedTypes.DAConnectionStatus.Substatus"

Meaning, you can query them directly in Powershell, I use the script provided here. For sake of convenience I've included the list below:

Status Enum:

Name              Value
----              -----
ConfigChanged         0
ConnectedLocally      1
ConnectedRemotely     2
ActionableError       3
Error                 4 

SubStatus Enum:

Name                                    Value
----                                    -----
Invalid                                     0
None                                        1
NAPUnhealthy                                2
StrongAuthorizationCredentialsNeeded        3
LocalDNSNamesPreferred                      4
NoDirectAccessPolicy                        5
InternetConnectivityDown                    6
CouldNotContactDirectAccessServer           7
NameResolutionFailure                       8
RemoteNetworkAuthenticationFailure          9
RemoteNetworkConnectivityDown              10
SomeRemoteNetworkResourcesNotResponding    11
MissingDAClientExperienceConfiguration     12
MissingProxyConfiguration                  13
ProxyCredentialsNeeded                     14
IPHTTPSCertificateNeeded                   15
IPv6Disabled                               16
FirewallDisabled                           17 
Related Topic