Set-PPModuleConfiguration

Stores a named configuration value in the module's local cache.

Syntax

Default (Default)

Set-PPModuleConfiguration
    [-Name] <String>
    [-Value] <Object>
    [<CommonParameters>]

Description

The Set-PPModuleConfiguration cmdlet persists a named configuration value in the module's cached configuration file so it's available across sessions. The value can be any object and is stored under the provided name.

The reserved 'ServicePrincipalAuth' name can't be set through this cmdlet because it requires a validated, strongly-typed configuration. Use the dedicated Set-PPServicePrincipalAuth cmdlet to configure service principal authentication.

Passing $null for the value removes the named configuration entry. Use Get-PPModuleConfiguration to read stored configuration values back.

Examples

EXAMPLE 1

Set-PPModuleConfiguration -Name "MySetting" -Value "SomeValue"

Stores the value "SomeValue" under the name "MySetting".

EXAMPLE 2

Set-PPModuleConfiguration -Name "MySetting" -Value $null

Removes the "MySetting" configuration entry.

Parameters

-Name

The name of the configuration entry to store.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Value

The value to store for the configuration entry. Pass $null to remove it.

Parameter properties

Type:Object
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Outputs

None.