unable to hide Published desktop for specific client device/domain groups via BrokerAccessPolicy
Limit visibility in a delivery group for specific user/client
Get the output of Get-BrokerSession
you will see two properties:
ClientName and ReceiverName, and ReceiverName that's the one used for filtering
to hide Published desktop for specific client device:
Create a new-brokeraccesspolicyrule for the existing Delivery group
New-BrokerAccessPolicyRule -Name "test_AG" -AllowedConnections ViaAG -ExcludedClientNameFilterEnabled $true -ExcludedClientNames "ReceiverName " -IncludedSmartAccessFilterEnabled $true
New-BrokerAccessPolicyRule -Name "test_Direct" -AllowedConnections NotViaAG -ExcludedClientNameFilterEnabled $true -ExcludedClientNames "ReceiverName " -IncludedSmartAccessFilterEnabled $true
The broker access policy created for an existing Delivery group and client was added in ExcludedclientNames filter.
to hide Published desktop for specific domain groups via BrokerAccessPolicy:
New-BrokerAccessPolicyRule -Name "test_AG" -AllowedConnections anyViaAG -IncludedUsers "domain\Domain users"-IncludedUserFilterEnabled $true -ExcludedUsers "Domain\testGroupuser" -ExcludedUserFilterEnabled $true -IncludedSmartAccessFilterEnabled $true
New-BrokerAccessPolicyRule -Name "test_Direct" -AllowedConnections anyNotViaAG -IncludedUsers "Domain\Domain Users" -IncludedUserFilterEnabled $true -IncludedSmartAccessFilterEnabled $true
To remove the policy rule:
Remove -BrokerAccessPolicyRule -Name "test_AG"
Remove -BrokerAccessPolicyRule -Name "test_Direct"
This will delete the policy and existing filters added to the Delivery group.
Note: if you made changes via POSH it will protect to make change setting via GUI