If you use WMIC commands extensively, you would have come across the error – ‘Invalid alias verb’. WMIC error messages are not much self explanatory, so they don’t help in debugging what’s wrong with the command you ran. I encountered this error quite a few times, and upon careful examination I was able to identify what was causing this.
Below was one such instance I got the error
c:\>wmic useraccount where username = 'test1' set PasswordRequired=true = - Invalid alias verb.
With a quick look, it would not seem like there’s anything wrong with the command. It’s the white space in the where condition that was causing it. So same command with white space removed works perfectly fine.
c:\>wmic useraccount where name='test1' set PasswordRequired=true Updating property(s) of '\\MYPC\ROOT\CIMV2:Win32_UserAccount.Domain="MYPC",Name="test1"' Property(s) update successful.
So if you encounter this error, you should check your command for such whitespaces, remove them and try running the command again.
I also notice you changed “where username” to “where name”, perhaps that was the actual problem?
While relevant this does confuse the “fix” the whitespace refers to the space between “name” and “=”