How to clear the group policy cache on a machine
Clear the group policy cache on a machine
way one
- Open My Computer/Computer
- In the URL or address bar paste: %windir%\system32\GroupPolicy
- Right click and delete the: Machine and User folders to clear local group policy cache
- Restart the computer to reapply the group policies
You can also run the little PowerShell oneliner as Administrator to remove the Group Policy folder and all files below:
Remove-Item "$env:windir\system32\GroupPolicy" -Force -Recurse
way two
- Delete the “HKLM\Software\Policies\Microsoft” Key (looks like a folder).
- Delete the “HKCU\Software\Policies\Microsoft” Key
- Delete the “HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects” Key.
- Delete the “HKCU\Software\Microsoft\Windows\CurrentVersion\Policies” Key.
third way
- Remove the computer from the domain – (change to a Workgroup)
- Restart computer
- Run gpupdate /force
- Rejoin the domain
How to disable printer redirection on Windows Server 2008 print server
How to disable printer redirection on Windows Server 2008 print server
You may notice that when RDP’ing into the Print Server, you are having print drivers being installed that were installed on the client (workstation or laptop).
This could be due to the RDP (RDS/TS) printer redirection being enabled.
GPO or GPEdit.msc (Local policy)
Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Printer Redirection > Do not allow client printer redirection
or via the registry key:
HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
fDisableCpm set to 1
Users can also control printer redirection settings through the Remote Desktop Connection (RDC) client, or when starting a connection to a RemoteApp program.
-
Start the Remote Desktop Connection client.
-
Click Options.
-
On the Local Resources tab, under Local devices and resources, select or clear the Printers check box.
Available policy setting in GPO
| Explanation | ||
|---|---|---|
|
Do not allow client printer redirection |
This policy setting allows you to specify whether to prevent the mapping of client printers in Terminal Services sessions. You can use this policy setting to prevent users from redirecting print jobs from the remote computer to a printer attached to their local (client) computer. By default, Terminal Services allows this client printer mapping. If you enable this policy setting, users cannot redirect print jobs from the remote computer to a local client printer in Terminal Services sessions. If you disable this policy setting, users can redirect print jobs with client printer mapping. If you do not configure this policy setting, client printer mapping is not specified at the Group Policy level. However, an administrator can still disable client printer mapping by using the Terminal Services Configuration tool. |
|
|
Do not set default client printer to be default printer in a session |
This policy setting allows you to specify whether the client default printer is automatically set as the default printer in a Terminal Services session. By default, Terminal Services automatically designates the client default printer as the default printer in a Terminal Services session. You can use this policy setting to override this behavior. If you enable this policy setting, the default printer is the printer specified on the remote computer. If you disable this policy setting, the terminal server automatically maps the client default printer and sets it as the default printer upon connection. If you do not configure this policy setting, the default printer is not specified at the Group Policy level. However, an administrator can configure the default printer for client sessions by using the Terminal Services Configuration tool. |
|
|
Redirect only the default client printer |
This policy setting allows you to specify whether the default client printer is the only printer redirected in Terminal Services sessions. If you enable this policy setting, only the default client printer is redirected in Terminal Services sessions. If you disable or do not configure this policy setting, all client printers are redirected in Terminal Services sessions. |
|
|
Specify terminal server fallback printer driver behavior |
This policy setting allows you to specify the terminal server fallback printer driver behavior. By default, the terminal server fallback printer driver is disabled. If the terminal server does not have a printer driver that matches the client's printer, no printer will be available for the terminal server session. If you enable this policy setting, the fallback printer driver is enabled, and the default behavior is for the terminal server to find a suitable printer driver. If one is not found, the client's printer is not available. You can choose to change this default behavior. The available options are: Do nothing if one is not found If there is a printer driver mismatch, the server will attempt to find a suitable driver. If one is not found, the client's printer is not available. This is the default behavior. Default to PCL if one is not found If no suitable printer driver can be found, default to the Printer Control Language (PCL) fallback printer driver. Default to PS if one is not found If no suitable printer driver can be found, default to the PostScript (PS) fallback printer driver. Show both PCL and PS if one is not found If no suitable driver can be found, show both PS and PCL-based fallback printer drivers. If you disable this policy setting, the terminal server fallback driver is disabled and the terminal server will not attempt to use the fallback printer driver. If you do not configure this policy setting, the fallback printer driver behavior is off by default. |
|
|
Use Terminal Services Easy Print printer driver first |
This policy setting allows you to specify whether the Terminal Services Easy Print printer driver is used first to install all client printers. If you enable or do not configure this policy setting, the terminal server first tries to use the Terminal Services Easy Print printer driver to install all client printers. If for any reason the Terminal Services Easy Print printer driver cannot be used, a printer driver on the terminal server that matches the client printer is used. If the terminal server does not have a printer driver that matches the client printer, the client printer is not available for the Terminal Services session. If you disable this policy setting, the terminal server tries to find a suitable printer driver to install the client printer. If the terminal server does not have a printer driver that matches the client printer, the server tries to use the Terminal Services Easy Print printer driver to install the client printer. If for any reason the Terminal Services Easy Print printer driver cannot be used, the client printer is not available for the Terminal Services session. |
|
Combination WMI filter for operating system
You can create combination filters. The following table shows query statements for common operating system combinations.
|
WMI Filter Name |
WQL Query Statement |
|---|---|
|
Windows Vista and Windows Server 2008 |
select * from Win32_OperatingSystem where Version like "6.0%" and ProductType<>"2" |
|
Windows Server 2003 and Windows Server 2008 |
select * from Win32_OperatingSystem where (Version like "5.2%" or Version like "6.0%") and ProductType="3" |
|
Windows 2000, XP and 2003 |
select * from Win32_OperatingSystem where Version like "5.%" and ProductType<>"2" |
WMI filter
The filter for Windows 2000 is used to prevent computers that are running later versions of Windows from applying the GPO. You cannot use a WMI filter to apply a GPO to computers that are running Windows 2000 because that version of the operating system does not support WMI filters.
You can also create combination filters when required by your design. The following table shows query statements for common operating system combinations.
WMI Filter Name
WQL Query Statement
Windows Vista and Windows Server 2008
select * from Win32_OperatingSystem where Version like "6.0%" and ProductType<>"2"
Windows Server 2003 and Windows Server 2008
select * from Win32_OperatingSystem where (Version like "5.2%" or Version like "6.0%") and ProductType="3"
Windows 2000, XP and 2003
select * from Win32_OperatingSystem where Version like "5.%" and ProductType<>"2"




