Set-IniValue
SYNOPSISโ
Opens an INI file and sets the value of the specified section and key.
SYNTAXโ
Set-IniValue [-FilePath] <String> [-Section] <String> [-Key] <String> [-Value] <Object>
[[-ContinueOnError] <Boolean>] [<CommonParameters>]
DESCRIPTIONโ
Opens an INI file and sets the value of the specified section and key.
EXAMPLESโ
EXAMPLE 1โ
Set-IniValue -FilePath "$envProgramFilesX86\IBM\Notes\notes.ini" -Section 'Notes' -Key 'KeyFileName' -Value 'MyFile.ID'
PARAMETERSโ
-FilePathโ
Path to the INI file.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Sectionโ
Section within the INI file.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Keyโ
Key within the section of the INI file.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Valueโ
Value for the key within the section of the INI file. To remove a value, set this variable to $null.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ContinueOnErrorโ
Continue if an error is encountered. Default is: $true.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: True
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.