Tuesday, June 30, 2015

Disable RDP Client Printer Mappings on Windows Servers

When you connect RDP to a server, the printer mappings can usually cause Event ID 1111 in the System log due to the printer drivers not being installed on the remote server.  Up until Windows 2008 it was easy to launch TSConfig.MSC and disable printer mappings for good.  Windows Server 2012 no longer has this console, but you can still control this with the same single regval.
Command line:
REG.exe ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /V fDisableCpm   /t REG_DWORD /D 1 /F

Registry file:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"fDisableCpm"=dword:00000001

With Regedit.exe, you can just search the registry for value "fdisablecpm" and change them all to 1.

You can also try the Group Policy methods, or the GP regvals that affect this location:

Sunday, June 28, 2015

Restore Outlook Favorite Folders


Thanks to some supported users for clicking just the right "I don't know what I did..." and needing their favorites folders back.
  • Close Outlook.
  • Click the Windows Start button in the lower, left corner of the screen.
  • In the field where your cursor is flashing, type "Outlook.exe /resetnavpane".
  • Start Outlook.

Recover SA password in MSSQL

http://v-consult.be/2011/05/26/recover-sa-password-microsoft-sql-server-2008-r2/
http://www.mssqltips.com/sqlservertip/2682/recover-access-to-a-sql-server-instance/

General steps: change to single user, restart SQL server, create a new SysAdmin ID, restart in multiuser, use new SqlAdmin to reset sa password.

Detailed steps:
1) Open SQL Server Configuration Manager
2) Stop all services, including SSIS, SSRS, and SQL agent
3) Right-click properties on the instance, usually 'SQL Server (MSSQLSERVER)'
4) On the Advanced tab, prefix the Startup parameters with '-m;', e.g. '-m;-dC:\Program Files\Microsoft..."
5) Start the SQL instance service.
6) Start the Command Prompt, and execute SQLCMD.
Type the following commands at the 1> and 2> prompts.
   1> CREATE LOGIN sabackup WITH PASSWORD = 'sabackup1'
   2> go
   1> sp_addsrvrolemember 'sabackup','sysadmin'
   2> go
   1> exit
7) Stop the SQL server instance again, revert the Startup parameters, and restart the instance.
8) Use SQL Server Management Studio to change the sa password.

Or, from the 2nd link, a more elegant solution is to login as a local administrator and then use PsExec from PSTools to launch the SSMS as the Local System account:
PsExec -s -i "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"
... and then edit then edit the SA password.

Disable IPv6 on WIndows

https://support.microsoft.com/en-us/kb/929852
http://www.thewindowsclub.com/disable-ipv6-5-second-boot-delay
http://blogs.technet.com/b/askpfeplat/archive/2014/09/15/a-5-second-boot-optimization-if-you-ve-disabled-ipv6-on-windows-client-and-server-by-setting-disabledcomponents-to-0xffffffff.aspx

You can disable IPv6 per interface by clearing the TCP/IPv6 checkbox in each adapter's Ethernet Properties under "This connection uses the following items:", but if you truly have no need for IPv6, you can use the following registry enrty to affect a more permanent change.  Reboot required.

From the command line, running as administrator:
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters /v DisabledComponents /t REG_DWORD /d 0xff

Regedit file
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters]
"DisabledComponents"=dword:000000ff