filmov
tv
PowerShell 21 Create another ArrayList to whitelist users and how to use it with Where-Object

Показать описание
In this video, the Kilt Guy makes a few simple mistakes while remembering that an ArrayList is not a string while creating a whitelist of users to exempt from other actions (like password settings, adding or removing from groups, etc.).
Commands discussed:
Get-LocalUser
Where-Object (using -NotIn argument instead of -NotMatch)
0:00 Intro
0:25 Discussing the importance of whitelisting special user accounts from certain activities
2:20 Adding a block of code to collect accounts to be whitelisted
4:55 Adding to an ArrayList outside of a While loop
5:01 Testing the modified block of code
6:08 Creating a new variable using the whitelist ArrayList
8:17 Testing the new variable using the whitelist ArrayList
9:57 Explaining why you have to use the -NotIn (or -In) argument with Arrays and ArrayLists
10:48 (Re)testing the whitelist ArrayList
11:55 Outro
Commands discussed:
Get-LocalUser
Where-Object (using -NotIn argument instead of -NotMatch)
0:00 Intro
0:25 Discussing the importance of whitelisting special user accounts from certain activities
2:20 Adding a block of code to collect accounts to be whitelisted
4:55 Adding to an ArrayList outside of a While loop
5:01 Testing the modified block of code
6:08 Creating a new variable using the whitelist ArrayList
8:17 Testing the new variable using the whitelist ArrayList
9:57 Explaining why you have to use the -NotIn (or -In) argument with Arrays and ArrayLists
10:48 (Re)testing the whitelist ArrayList
11:55 Outro