PowerShell DirectAccessClientComponents module
DirectAccessClientComponents is the client-side module for DirectAccess: it manages the multisite entry point table, manual site selection and the client user experience. DirectAccess connects a managed laptop to the office network automatically whenever it is outside, without a VPN button.
236.1 Why is it used?
- Remote laptops reach intranet servers with no user action, and IT can manage them whenever they are online.
- Multisite: several DA sites (entry points); the client picks the best one, or a user/admin can pin one.
- 11 cmdlets; New/Set/Remove/Enable need an admin shell.
- Microsoft now recommends Always On VPN instead of DirectAccess for new deployments.
236.2 How it works
- Step 1
1.Laptop on hotel Wi-Fi probes the Network Location Server (NLS) over HTTPS
- Step 2
2.NLS is reachable only inside the office, so the probe fails
- Step 3
3.Laptop concludes "I am outside"
- Step 4
4.Office IPv6 traffic goes into an IP-HTTPS tunnel over the Internet
- Step 5
5.DA server Edge1 ends the IPsec tunnel and forwards to intranet.corp.contoso.com
- Step 6
6.No click, no VPN for the user
- Step 1
1.Company has two DA sites: Redmond and Paris (entry points)
- Step 2
2.Entry point table reaches the laptop via Group Policy
- Step 3
3.Laptop in Europe auto-selects Paris (AutomaticallySelected)
- Step 4
4.For troubleshooting: Enable-DAManualEntryPointSelection -EntryPointName Redmond (ManuallySelected)
- Step 5
5.Disable-DAManualEntryPointSelection returns to automatic
Manual selection succeeds only when the laptop is outside the corp network
236.3 Comparison: DirectAccess vs VPN
| Point | DirectAccess | Normal VPN / Always On VPN |
|---|---|---|
| Who connects | Automatic as soon as the laptop is outside | Normal VPN: user clicks connect; Always On VPN: automatic |
| Inside detection | NLS reachable = inside, tunnel stays off | Trusted network detection (Always On VPN) |
| Transport | IPv6 over IP-HTTPS / Teredo / 6to4 + IPsec | IKEv2 / SSTP etc. |
| Status today | Legacy | Microsoft's recommendation for new deployments: Always On VPN |
236.4 What was run on Windows (read-only)
Get-Command -Module DirectAccessClientComponents | Measure-ObjectGet-Help Get-DAEntryPointTableItem$ Get-Command -Module DirectAccessClientComponents | Measure-ObjectCount : 11$ Get-Help Get-DAEntryPointTableItemNAME Get-DAEntryPointTableItemSYNTAX Get-DAEntryPointTableItem [-EntryPointName <string[]>] [-State {NotSelected | AutomaticallySelected | ManuallySelected}] [-PolicyStore <string>] [-CimSession <CimSession[]>] [-ThrottleLimit Get-DAEntryPointTableItem [-EntryPointName <string[]>] [-State {NotSelected | AutomaticallySelected | ManuallySelected}] [-GPOSession <string>] [-CimSession <CimSession[]>] [-ThrottleLimit <int>]REMARKS Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.- No DirectAccess cmdlet was run: even Get-* would show office entry points and servers.
- Get-DAEntryPointTableItem has two syntax sets: -PolicyStore or -GPOSession; -State values NotSelected | AutomaticallySelected | ManuallySelected.
236.5 Common parameters
| Parameter | What it does |
|---|---|
| -CimSession / -AsJob / -ThrottleLimit | Remote PC / background job / max parallel operations |
| -WhatIf / -Confirm | Only show / ask first |
| -PolicyStore | ActiveStore (Get default), "Domain\GPOName", or "GPO:<computer>" (local GPO) |
| -GPOSession | Group Policy session; cannot be combined with -PolicyStore |
236.6 Get cmdlets
Get-DAClientExperienceConfiguration -PolicyStore "ActiveStore"Get-DAEntryPointTableItem -PolicyStore "ActiveStore" -EntryPointName "Redmond" -State "NotSelected"- Client experience: UI on/off, support email etc.; entry point table: sites, IPs, IP-HTTPS profile.
- -State is deprecated; the docs show no output and these were not run here.
236.7 Manual entry point selection
Enable-DAManualEntryPointSelection -EntryPointName "Redmond" # works only outside the corp networkDisable-DAManualEntryPointSelection # back to automatic site selection236.8 Managing entry points
New-DAEntryPointTableItem -PolicyStore "GPO:Localhost" -ADSite "Paris" ` -EntryPointRange "2001::/16" -TeredoServerIP "131.107.1.1" ` -EntryPointIPAddress "200::1" -GslbIP "131.107.0.1" -EntryPointName "Paris"| Parameter | Meaning |
|---|---|
| -ADSite | AD DS site (required) |
| -EntryPointName | Site name (required) |
| -EntryPointRange | IPv6 range of clients using this entry point |
| -EntryPointIPAddress | IPv6 address of the entry point |
| -TeredoServerIP / -IPHttpsProfile | Teredo server / IP-HTTPS profile |
| -GslbIP | Global server load balancing IP |
Get-DAEntryPointTableItem -EntryPointName "Redmond" -PolicyStore "Contoso\GPO1" | Remove-DAEntryPointTableItemRemove-DAEntryPointTableItem -EntryPointName "Redmond" -PolicyStore "Contoso\GPO1"Rename-DAEntryPointTableItem -EntryPointName "Redmond" -NewName "Bellevue" -PolicyStore "Contoso\GPO1"# docs example writes Set-DAEntryTableItem; the real name is Set-DAEntryPointTableItemSet-DAEntryPointTableItem -EntryPointName "Paris" -GslbIP "131.107.0.1" -PolicyStore "Contoso\GPO1"Reset-DAEntryPointTableItem -GslbIP -EntryPointName "Paris" -PolicyStore "Contoso\GPO1"- Set takes the same options as New; Reset with a switch (e.g. -GslbIP, -TeredoServerIP, -IPHttpsProfile) puts only that property back to not configured.
- -InputObject takes the pipeline object, -PassThru passes the result on.
236.9 Client experience settings
Set-DAClientExperienceConfiguration -PolicyStore "Contoso\GPO1" -UserInterface "False"Reset-DAClientExperienceConfiguration -PolicyStore "Contoso\GPO1" -FriendlyName "Traveling Policy"# block user override of the site:Set-DAClientExperienceConfiguration -ManualEntryPointSelectionAllowed $false| Setting | Meaning |
|---|---|
| -CorporateResources | Connectivity probes: "HTTP:", "FILE:", "PING:" |
| -IPsecTunnelEndpoints | "Ping: ipaddress" checks of the tunnel endpoints |
| -FriendlyName | Name shown in the UI (up to 15 chars) |
| -SupportEmail | Needed for logging |
| -UserInterface | UI on/off (default True) |
| -PassiveMode | Fewer probes (default False) |
| -PreferLocalNamesAllowed | User may disconnect DirectAccess |
| -ManualEntryPointSelectionAllowed | User may pick a site (default True) |
| -GslbFqdn / -ForceTunneling | Multisite FQDN / Enabled, Disabled (default), Default |
| -CustomCommands | Admin commands added to logs |
- Reset-DAClientExperienceConfiguration has a switch per property; these settings can also come from an ADMX file in Group Policy.
236.10 Common mistakes
- Treating DirectAccess as a normal VPN with a connect button: it is automatic once outside.
- Expecting a tunnel inside the office: NLS reachable means DirectAccess stays off.
- Running Enable-DAManualEntryPointSelection inside the corp network: it only works outside.
- Copying the docs typo Set-DAEntryTableItem instead of Set-DAEntryPointTableItem.
- Using -PolicyStore and -GPOSession together.
236.11 Interview tips
- Pin a client to one site: Get-DAEntryPointTableItem -> Enable-DAManualEntryPointSelection -EntryPointName -> later Disable-DAManualEntryPointSelection.
- Block user override: Set-DAClientExperienceConfiguration -ManualEntryPointSelectionAllowed $false.
- NLS decides inside vs outside; IP-HTTPS is the usual transport through firewalls.
- For new deployments mention Always On VPN.