Adding registry value names and value

I'm trying to implement a command I normally run in batch into PS. I'm a beginner when it comes to PS and need some assistance.

Basically, during the logon process, among other things, this registry gets added. The end result is that I can actually see the user's AD name when I select the user's SID under HKEY_USERS.

REG ADD HKCU /v UserName /d %UserName% /F


No Data
Reply Children
No Data