New-LiquitAppSettingExcludedItem

Adds an Excluded Item to an existing Included Item. An Excluded Item defines a sub-path or sub-key within an Included Item that should be skipped during capture. It is always a child of an AppSettingIncludedItem.

Syntax

# Via parent IncludedItem entity
New-LiquitAppSettingExcludedItem
    [-Parent] <AppSettingIncludedItem>
    -Name <string>
    -ValueType <ExcludedItemValueType>
    -Value <string>
    [-WhatIf] [-Confirm]

# Via parent IncludedItem ID
New-LiquitAppSettingExcludedItem
    [-ID] <Guid>
    -Name <string>
    -ValueType <ExcludedItemValueType>
    -Value <string>
    [-WhatIf] [-Confirm]

Parameters

Parameter Type Position Mandatory Description
Parent AppSettingIncludedItem 0 Yes (set byParentEntity) The Included Item to add an exclusion to.
ID Guid 0 Yes (set byParentId) ID of the parent Included Item.
Name string Yes Display name for this excluded item.
ValueType ExcludedItemValueType Yes Type of location to exclude. See ExcludedItemValueType.
Value string Yes Path, filename, extension, or registry key/value name to exclude, relative to the parent Included Item's Root. A leading \ is stripped automatically.

Output: AppSettingExcludedItem

Supports: -WhatIf-Confirm

Examples

# Exclude a temporary folder under an already-created included item
$setting      = Get-LiquitAppSetting -Name 'Outlook Settings'
$includedItem = $setting.IncludedItems[0]

New-LiquitAppSettingExcludedItem `
    -Parent    $includedItem `
    -Name      'Exclude Temp' `
    -ValueType Folder `
    -Value     'Temp'

# Exclude all .log files
New-LiquitAppSettingExcludedItem `
    -Parent    $includedItem `
    -Name      'Exclude Logs' `
    -ValueType FileExtension `
    -Value     'log'