How to find a user's SID

Sometimes I need to fiddle with a registry setting normally under HKEYCURRENTUSER, but that points to your own hive. When you need to change another user's registry whilst being logged in on a terminal server, you cannot load the hive file ntuser.dat as it is already loaded. For that issue the following command in cmd.exe:

wmic useraccount get name,sid

Then use the SID to locate the user's hive under HKEY_USERS.

The problem with today's instant news

News article
News article

Unhappy case

Just received a business requirement document from a multi billion dollar company... Guess this "Used [sic] Case" is feeling tired even though it is only number 1!

Used Case
Used Case

Upgrading Windows Server 2008 R2 to Windows Server 2012

According to Microsoft, it is a supported operation to upgrade a Windows 2008 R2 Domain Controller in place to Windows 2012 Standard (GUI to GUI). But let me warn you - this will most likely fail. I have tried upgrading and after working around some small issues (such as incompatible Anti Virus and some S3 Device Cap driver issue, I finally had no warnings left for the upgrade pre-flight check. It started the upgrade, and rebooted a couple of times. However it never got past "Getting Ready" with the spinning circle. Luckily I could roll back...

In the end to get from Windows Server 2008 R2 PDC with Exchange 2010 to Windows Server 2012 with Exchange 2013 I did the below:

  1. Made a good backup of the HyperV VM containing Windows 2008 R2 PDC.
  2. Prepared Windows 2008 R2 by running adprep from the Windows 2012 DVD for both forest and domain levels.
  3. Ensured Windows 2008 R2 domain is in good health.
  4. Created a new virtual machine and installed a clean Windows Server 2012 with GUI.
  5. Stopped the Exchange transport service on the 2008 R2 server (to prevent new emails from arriving).
  6. Exported all mailboxes using New-MailboxExportRequest cmdlet in EMS to .pst files on the 2008 R2 server.
  7. Uninstalled Exchange 2010 (a huge mission since you have to perform a lot of small manual steps).
  8. Made the new VM a member server of the domain.
  9. Promoted the new server to a domain controller using the server manager (basically, install the AD role and select the Promote to domain controller option at the end) and transferred all FSMO roles making it the new PDC.
  10. Fiddled with the DNS settings to ensure the old server now points to the new server, and that the new server points to itself.
  11. Set up DHCP on the new server by exporting the configuration from the old server using NETSH DHCP SERVER command and importing it on the new server.
  12. While this was ongoing I used robocopy /mir /sec/ secfix to copy all data directories over, including profile folders and folder redirection folders.
  13. Recreated all shares on the new server.
  14. Renamed old server to a temporary name using netsh, renamed new server to the old server's original name. Also swopped the IP addresses so that the old server's IP address is now the new server's address. This allowed me not to need fiddling with DHCP options and group policies.
  15. Installed Exchange 2013 on the new server.
  16. Set up send connector, accept domains, external addresses for virtual directories, new SSL certificate, add mailboxes for users in AD.
  17. Using New-MailboxImportRequest cmdlet, import the pst files exported earlier. During this time the mail server was already accepting new emails.
  18. Demoted the old server from role of domain controller using dcpromo.
Full Article

Second attempt...

Fern sori
Fern sori