Windows Terminal Server shows duplicate printers with "driver is unavailable" that can't be removed - windows

In my windows server configured as terminal server, in the user "printer and drivers" I see some printers that are not installed, these printers don't show up in print management console and if I delete "remove device" button it doesn't work.
Theese printers has the same name of printers that I uninstalled.
How can I remove theese printers?

Open the Registry Editor by typing "regedit" in the Start menu search bar and pressing Enter.
Navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers
Look for the entries that correspond to the phantom printers. You can identify them by their names, which should match the names of the printers you uninstalled.
Right-click on the entry and select "Delete" to remove it.
Confirm that you want to delete the entry by clicking "Yes" in the dialog box.
Repeat steps 4-5 for each phantom printer that you want to remove.
Close the Registry Editor and restart the Print Spooler service by typing "services.msc" in the Start menu search bar, finding the "Print Spooler" service, right-clicking it, and selecting "Restart."
After you have completed these steps, the phantom printers should be removed from the list of printers available to your users. However, it's always a good idea to make a backup of your registry before making any changes, just in case something goes wrong.

Related

How can I safely delete Windows.old folder on Windows 10?

I tried using the command lines but to no avail, as I encountered the error "Permission Denied", even after taking ownership of the folder, etc.
I would like to add if you would like to reserve the possibility to roll back to a previous version of Windows, then please do not attempt this folder removal, otherwise all records of your previous Windows will remain after the removal.
This post is for an emergency fix in the case the existence of your "Windows.old" file may cause problems in some scenarios.
There are several steps to accomplish the task:
Press Windows key + R to open up a Run command in the search bar right next to the Windows icon. Then, in the Run command, type “ms-settings:storagesense” and hit Enter to open the Storage screen.
On the right side under "Local Storage", click on the C drive (or the drive letter that holds your Windows files) concerned.
Choose "Temporary files".
Then choose to remove "Previous version of Windows" along with any other options you desire.
Click on "Remove" files.
Check that the "Windows.old" folder has indeed been removed from your C drive.

Virtual Shared Driver Indexing problems

We just virtualized a Windows server in Azure and everything in working fine on Client side, but we are not being able to solve the indexing search problem.
When you have a local drive, Windows can index the path and searches works fine using Windows menu/search box in task bar. But for shared drives it seems to fail.
In Windows Explorer the search pretends to work, but it takes forever to find a file or folder. And sometimes it just won't move anywhere. So it is not an option for users since them are used to search using menu bar.
We have tried to change drive properties in Right button to Shared Driver > "Allow files on this drive to have contents indexed in addition to file properties, but it was already enabled.
When we try to disable it, it prompts an error saying that the user doesn't have permission to do it, but it does anyway. And when we try to re-enable, the message prompts again, but it is enabled with no problem at all. But once again, nothing changes and Initial Menu Search just won't work.
Does anyone knows if there is a solution for that?
For me it seems to be an server setup since I see that permission error, but, as far as I know, if the shared driver is already mounted, I can't see a reason why Windows can't index it.
Ps.1: In the shared drive security tab, the System has full permissions.
Ps.2: If there is a solution for this, is that possible to solve it on the Windows server Side so we won't need to access client by client to change it manually?
enter image description here
Please check the following setting and see.
1.First thing is to check network location is being indexed. open File Explorer right-click on the mapped network drive that you need to index, then select the Properties and Make sure that, the Allow Files on this Drive to Have Contents Indexed checkbox is selected.
You have already done this step
2.try to check the search options for network drive in file explorer, go to view tab>>click on Options Icon and choose the change folder and search option menu it will open the folder options dialog box and select search tab and make sure first option is not selected
3.check server side Indexing
4.we need to make sure search service needs to be running.
Open services.msc check for the wndows search service and try to restart the service.
5.Go to Settings on the Windows 10 desktop, then click on Search, followed by Searching Windows scroll down and try to run the indexer troubleshooter
Reference https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/fix-problems-in-windows-search

Changing Local Policy "Prevent installation of removable devices "in CMD

How do I edit Group Policy Object "Prevent installation of removable devices" (https://technet.microsoft.com/en-us/library/cc753539(v=ws.10).aspx) in CMD?
I have a server (Windows Server 2008 R2) that is locked out as I am unable to use keyboard or mouse to as input devices when the windows login requires me to press ctrl+alt+delete. This Policy is the one causing this locked out situation as the old keyboard and mouse which I am trying to solve.
Current situation only allows me to use CMD to make changes to the system when I boot up with a bootable CD.
My server doesn't have PS2 port for the old type keyboard. Any other solution that can help me solve this locked out situation is also welcome :)
"Prevent installation of removable devices" is part of "Administrative Templates" and therefore corresponds to a Registry key.
To find out that registry key, I searched for "Prevent installation of removable devices" within C:\Windows\PolicyDefinitions\en-US\, found <string id="DeviceInstall_Removable_Deny">Prevent installation of removable devices</string> in C:\Windows\PolicyDefinitions\en-US\DeviceInstallation.adml. Then I searched for DeviceInstall_Removable_Deny in C:\Windows\PolicyDefinitions\ and found it in C:\Windows\PolicyDefinitions\DeviceInstallation.admx. The registry key is:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions
valueName: DenyRemovableDevices
enabled Value: decimal 1
disabled Value: decimal 0
If you change that value, it will be overridden when the group policy is applied the next time -- most likely at boot time.
According to http://learnthat.com/prevent-group-policy-from-applying-to-your-computer/ you can avoid this by denying write permissions to that specific registry key. (Note, I did not test this!)
To change the registry offline, you can boot from a windows install CD, press Shift+F10 simultaneously to open cmd, type regedit, select HKEY_LOCAL_MACHINE key, click Menu File -> Load Hive..., navigate to your installations \Windows\System32\Config\ folder and select the file named SOFTWARE.
Chose any key name, that doesn't already exist (e.g. Offline_Software) and then change the registry under that key. (e.g. HKEY_LOCAL_MACHINE\Offline_Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions)
When you're done, select your loaded Hive (e.g. HKEY_LOCAL_MACHINE\Offline_Software) and click File -> Unload Hive...
To shutdown properly, just close all windows, including the setup window.

WMIC Product GET Name - Invalid Class

I am trying to list all of the programs currently on my Windows 8.1 machine. I believe recently installed software is preventing windows from booting up. I have access to the command line and I have been trying to use the wmic product GET Name to see what I can uninstall from the command line. I read that you have to enable the WMI support tools in Management & Monitoring Tools, but I don't have access to that. Does anyone know if I can enable that from the command line so I can figure out why I am ultimately getting a EDIT:0x000021a error on start up.
Try
This is not a full list (wmic). This is only products installed with Windows Installer. There is no feature for everything.
However as I said in my previous post nearly everything is listed in the registry.
So to see it in a command prompt
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s
Also your error code seems invalid. There is no 27a windows error or 0xc000027a NT Status code. It seems wrong for a COM containing NTSTatus 0xd000027a or COM with Windows error 0x8007027a.
Clean Booting
Each of the three steps turns of programs, services, and drivers in increasing amounts. Thus narrowing down the possible culprits.
Clean Boot
Click Start - All Programs - Accessories - Run and type
msconfig
Then go to the Startup tab. Untick everything. Then go to the Services tab. Tick Hide All Microsoft Services and untick everything that's left.
Reboot. If this solves your problem reenable ½ of the services/startup items until you find which one.
Advanced Clean Boot
If the above doesn't help.
Download Autoruns from http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx
Start the program by right clicking and choosing Run As Administrator and click Options menu - Filter Options and tick Hide Microsoft entries and clear Include Empty Locations. Untick everything left.
Reboot. If this solves your problem reenable ½ of the items until you find which one.
Safe Mode
If the above doesn't help.
Use Safe Mode with Networking if you need internet access.
Click Start - All Programs - Accessories - Run and type
msconfig
Then go to the Boot tab and click Safe Boot (also tick Network if needed). Reboot. Come back here and untick Safe Boot to return to normal mode.
or
If your computer has a single operating system installed, repeatedly press the F8 key as your computer restarts. You need to press F8 before the Windows logo appears. If the Windows logo appears, you will need to try again. [From Start - Help and Support]
Startup Repair
If your computer has a single operating system installed, repeatedly press the F8 key as your computer restarts. You need to press F8 before the Windows logo appears. If the Windows logo appears, you will need to try again. [From Start - Help and Support].
On the Advanced Boot Options screen, use the arrow keys to highlight Repair your computer, and then press ENTER.
Select Startup Repair.
Startup repair makes a log file. See C:\Windows\System32\LogFiles\Srt\SrtTrail.txt.
To access if Windows won't start, on the Advanced Boot Options screen, use the arrow keys to highlight Repair your computer, and then press ENTER.
Select Command Prompt.
Type
type C:\Windows\System32\LogFiles\Srt\SrtTrail.txt |more
Also type explorer in your command prompt and see what happens.
My Explorer fixes listsways of using windows without the graphical shell.
To See if a Fix is Available
In Control Panel (and select Classic view in the left hand pane) choose Problem Reports and Solutions (type problem in Start's search box), go to Problem History, right click your error and choose Check For Solution.
You may also right click and choose Details for more info. Post those details here. The Fault Module Name is the important information.
If the problem affects Control Panel press Winkey + R and type wercon (or type it in a command prompt).
Close Explorer and Start a Command Prompt
Close any Explorer windows
Start - All Programs - Accessories - Right click Command Prompt and choose Run As Administrator.
Click Start. Ctrl + Shift + Right click a blank spot (just above the power buttons is one place) then Exit Explorer.
Press Ctrl + Alt + Delete then Task Manager.
Check all explorer processes are closed. On the Process tab select explorer and right click and choose End Process, repeat if more than one explorer in the list.
Then to restart explorer after trying each of the following
Press Ctrl + Alt + Delete and choose Task Manager
In Task Manager click the File menu then New Task (Run) and type explorer
If You Can't Start Explorer at All
Press Ctrl + Alt + Delete and choose Task Manager
On the Process tab click Show Processes From All Users to elevate to Administrator
In Task Manager click the File menu then New Task (Run) and type cmd
Other things you can try typing
Explorer
Explorer c:\
Explorer /e,c:\
wercon
control
iexplore
rstrui
If you can't start a folder window use the Browse button in the New Task dialog. Remember you need to right click and choose Open rather than double clicking.

Authentication issues using simulated host via UNC

After modifying my "hosts" file I have appended the location for "testunc" to "127.0.0.1". When I type in the path "\testunc\share" into "Run" (I have a shared folder on my C:\ drive called "share") I receive an authentication prompt. I am asked for the credentials to the "Guest" account on my local machine. Though the "Guest" account does not have a password, it always fails.
I am coding an application locally for use on a standalone network. I need to simulate the UNC path locally so that I can see if the application will work on the actual network.
\127.0.0.1\share works great, \localhost\share yields the following alert: "You were not connected because a duplicate name exists on the network."
Edit & Answer
Since I only have 9 rep at the moment I can't self answer for 6 more hours. I will self answer later on. Answer is as follows:
Ok, figured it out. I don't advise doing this if there are security concerns on the local PC that you will be using. I.E. undo this once you've done what you need.
Do all this after modifying your C:\windows\system32\drivers\etc\hosts file with the new hostname and IP.
Required Steps Overiew
Install Loopback adapter from Microsoft (might not matter)
Modify registry to disable loopback authentication
Modify registry to disable strict name checking.
Step Breakdown
First install the loopback adapter following these instructions (this is on Windows XP mind you). Go into the properties for this adapter and change its static IP address and gateway if you like. It will work the same way as Localhost but use a different IP.
Follow the instructions in the technet post referenced in my comments above (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Next open your registry (windows + r, 'regedit' in the run prompt).
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After reboot you must now disable strict name checking following the instructions from this article (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and click the following key in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
On the Edit menu, click Add Value, and then add the following registry DWORD value: DisableStrictNameChecking
Right-click DisableStrictNameChecking, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After the last restart you will be able to path to a "simulated" unc location on your localhost computer. This should help in testing network deployed applications / scripts on a standalone system.
Self answering this one. Answer is also included in original question text.
I don't advise doing this if there are security concerns on the local PC that you will be using. I.E. undo this once you've done what you need.
Do all this after modifying your C:\windows\system32\drivers\etc\hosts file with the new hostname and IP.
Required Steps Overiew
Install Loopback adapter from Microsoft (might not matter)
Modify registry to disable loopback authentication
Modify registry to disable strict name checking.
Step Breakdown
First install the loopback adapter following these instructions (this is on Windows XP mind you). Go into the properties for this adapter and change its static IP address and gateway if you like. It will work the same way as Localhost but use a different IP.
Follow the instructions in the technet post referenced in my comments above (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Next open your registry (windows + r, 'regedit' in the run prompt).
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After reboot you must now disable strict name checking following the instructions from this article (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and click the following key in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
On the Edit menu, click Add Value, and then add the following registry DWORD value: DisableStrictNameChecking
Right-click DisableStrictNameChecking, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After the last restart you will be able to path to a "simulated" unc location on your localhost computer. This should help in testing network deployed applications / scripts on a standalone system.

Resources