Skip to main content

New-Win32Rule

SYNOPSIS

{{ Fill in the Synopsis }}

SYNTAX

registry

New-Win32Rule [-RuleParentType <String>] [-RuleType <String>] -Path <String> [-Check32BitOn64System <Boolean>]
[-Operator <String>] [-ComparisonValue <String>] -ValueName <String> -RegistryOperationType <String>
[-ProgressAction <ActionPreference>] [<CommonParameters>]

file

New-Win32Rule [-RuleParentType <String>] [-RuleType <String>] -Path <String> -FileOrFolderName <String>
[-Check32BitOn64System <Boolean>] [-FileOperationType <String>] [-Operator <String>]
[-ComparisonValue <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

msi

New-Win32Rule [-RuleParentType <String>] [-RuleType <String>] -MSIPath <String> [-ProductCode <String>]
[-ProductVersionOperator <String>] [-ProductVersion <String>] [-AutoDetect <Boolean>] [-Operator <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

script

New-Win32Rule [-RuleParentType <String>] [-RuleType <String>] [-Operator <String>] -DisplayName <String>
[-EnforceSignatureCheck <Boolean>] [-RunAs32Bit <Boolean>] [-runAsAccount <String>] -ScriptPath <String>
[-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

{{ Fill in the Description }}

EXAMPLES

PARAMETERS

-AutoDetect

Detect the MSI properties automatically.

Type: Boolean
Parameter Sets: msi
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Check32BitOn64System

Expand 32bit variables on a 64bit system?

Type: Boolean
Parameter Sets: registry, file
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComparisonValue

The value to compare against.

Type: String
Parameter Sets: registry, file
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName

The script display name. Default will be file name.

Type: String
Parameter Sets: script
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnforceSignatureCheck

The enforces a script signature check.

Type: Boolean
Parameter Sets: script
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileOperationType

The path or file operation type. If exists is selected then the operator and comparison value are not required.

Type: String
Parameter Sets: file
Aliases:
Accepted values: notConfigured, exists, modifiedDate, createdDate, version, sizeInMB

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileOrFolderName

The file or folder name.

Type: String
Parameter Sets: file
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MSIPath

The path to the MSI file.

Type: String
Parameter Sets: msi
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Operator

The operator for comparison.

Type: String
Parameter Sets: (All)
Aliases:
Accepted values: notConfigured, equal, notEqual, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

The registry key path.

Type: String
Parameter Sets: registry, file
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProductCode

The product code to detect.

Type: String
Parameter Sets: msi
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProductVersion

The value to compare against.

Type: String
Parameter Sets: msi
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProductVersionOperator

The MSI operation type. If exists is selected then the operator and comparison value are not required.

Type: String
Parameter Sets: msi
Aliases:
Accepted values: notConfigured, equal, notEqual, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryOperationType

The registry operation type. If exists is selected then the operator and comparison value are not required.

Type: String
Parameter Sets: registry
Aliases:
Accepted values: notConfigured, exists, doesNotExist, string, integer, version

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleParentType

The type of rule to create.

Type: String
Parameter Sets: (All)
Aliases:
Accepted values: requirement, detection

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleType

{{ Fill RuleType Description }}

Type: String
Parameter Sets: (All)
Aliases:
Accepted values: file, registry, script, msi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunAs32Bit

Run script as 32bit on 64bit systems.

Type: Boolean
Parameter Sets: script
Aliases:
Accepted values: $true, false

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptPath

The script path.

Type: String
Parameter Sets: script
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ValueName

The registry value name to detect.

Type: String
Parameter Sets: registry
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-runAsAccount

The account type to run the requirements script as.

Type: String
Parameter Sets: script
Aliases:
Accepted values: system, user

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Collections.Hashtable

NOTES