Forum Discussion

Tiago Coelho Loss's avatar
Tiago Coelho Loss
Copper Contributor
Jul 31, 2018

Error handling variable% USERNAME% Windows Server 2019 Preview build - 17713 17723


The %USERNAME% environment variable does not return the logged-in user. Example: Administrator => SYSTEM

 

Image attached.

  • Alan CR's avatar
    Alan CR
    Copper Contributor
    Have same $env:username with 17723 (logged on as Administrator). Also tried running the Windows Update troubleshooter for something else and got a pop-up "Windows could not access.." ..\system32\msdt.exe.
  • Stefan Konijn's avatar
    Stefan Konijn
    Copper Contributor

    I had the same problem but in Powershell.

    calling the $env:username variable returned the "SYSTEM" as username

     

    (currently running build 17713).

     

     

Resources