Exercises
Client Lists

Exercise 6: Client Lists

Create a Client List

Let's create an IP Client List. You will need a contract and group ID, which can be retrieved with Get-Contract and Get-Group respectively (or you can use Get-ClientListContractsGroups). You can also include items in the creation command if you wish, but this is not required.

Add some entries to your Client List

Add the following entries to your client list. At least one must include tags and description, as described in the guide.

  • 1.1.1.1
  • 2.2.2.2
  • 3.3.3.3
  • 4.4.4.4

The command you need is Add-ClientListItem.

Create a CSV and import more items

Create a CSV file with the following content, and import it into your client list.

value,description,tags,expirationDate
5.5.5.5,fives,powershell testing,
6.6.6.6,sixes,powershell testing,
7.7.7.7,sevens,powershell testing,
8.8.8.8,eights,powershell testing,

The command you need is Import-ClientListItem. Make sure to add these items to your list, rather than replacing them.

Search client lists for one of your entries

Use Get-ClientList in combination with Where-Object to identify which client lists include the IP address '7.7.7.7'. You should find your list at least.

You must use the -IncludeItems parameter with Get-ClientList to retrieve the items in each list along with the list's metadata.

Remove some items from your list

Remove any 3 items from your list.

Deploy your list

Activate your Client List to staging.

Rename your list

You can change the name with Set-ClientList.

Deactivate and delete your list

Finally, deactivate your list from staging, then delete it. You can do this with Disable-ClientList and Remove-ClientList, but remember the deactivation must be complete before the deletion command can be issued.