INFORMATICS

The Best

How to clear the group policy cache on a machine

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Clear the group policy cache on a machine

way one

  1. Open My Computer/Computer
  2. In the URL or address bar paste: %windir%\system32\GroupPolicy
  3. Right click and delete the: Machine and User folders to clear local group policy cache
  4. 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

  1. Delete the “HKLM\Software\Policies\Microsoft” Key (looks like a folder).
  2. Delete the “HKCU\Software\Policies\Microsoft” Key
  3. Delete the “HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects” Key.
  4. Delete the “HKCU\Software\Microsoft\Windows\CurrentVersion\Policies” Key.

third way

  1. Remove the computer from the domain – (change to a Workgroup)
  2. Restart computer
  3. Run gpupdate /force
  4. Rejoin the domain

How to disable printer redirection on Windows Server 2008 print server

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

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.

  1. Start the Remote Desktop Connection client.

  2. Click Options.

  3. 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.

noteNote
If the Do not allow client printer redirection policy setting is enabled, this policy setting is ignored and the fallback printer driver is disabled.

 

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.

noteNote
If the Do not allow client printer redirection policy setting is enabled, the Use Terminal Services Easy Print printer driver first policy setting is ignored.

 

 

Combination WMI filter for operating system

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

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

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

    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"

Search