Today I had to add a list of about 20 individual usernames as administrators to a particular machine. Someone sent me the comma-separated list in an IM, and it took me about ten seconds:
PS> 'user1,user2,user3,user4,user5,user6,user7,user8,user9,user10'.split(',') |
>> %{net localgroup administrators $_ /add}
The command completed successfully.
The command completed successfully.
The command completed successfully.
The command completed successfully.
The command completed successfully.
The command completed successfully.
The command completed successfully.
The command completed successfully.
The command completed successfully.
The command completed successfully.
No comments:
Post a Comment