Windows Server Summit 2024
Mar 26 2024 08:00 AM - Mar 28 2024 04:30 PM (PDT)
Microsoft Tech Community
LIVE

Server 2019 %username%

Copper Contributor

Running Server 2019 I've noticed that the %username% variable is now set to SYSTEM.  With Server 2016, when a user runs a batch file I can use the %username% variable to return the name of the user running the session.  However, with Server 2019, when a user runs a batch, the %username% variable returns as SYSTEM.

 

I'm getting around this by parsing %userprofile% to find the name.  Should we expect this to be a change in how Server 2019 operates?

 

I should note that I am running build 17723.

 

0 Replies