During our SCCM Task Sequence (TS), using an unattend file, we create a local administrator account called “laptop”. Later during the same TS, we attempt to rename the “laptop” account by using a “Run Command Line” step… wmic useraccount where name="laptop" call rename name="%SMSTSUdaUsers:~4,12%".
As an example, say the %SMSTSUdaUsers% variable is equal to abc\user1. We’d like to rename the “laptop” account to “user1”.
Does anyone have an idea on how to accomplish this in one “Run Command Line” step?