< Back
Remove-IniFileItem
Post
NAME Remove-IniFileItem
SYNOPSIS
Get an item from an Ini file.
SYNTAX
Remove-IniFileItem [-Name] <String> [[-Section] <String>] [-Path] <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
Remove-IniFileItem -InputObject <PSObject> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-IniFileItem [-Name] <String> [[-Section] <String>] [-Path] <String> -LiteralValue <String> [-WhatIf]
[-Confirm] [<CommonParameters>]
Remove-IniFileItem [-Name] <String> [[-Section] <String>] [-Path] <String> -Value <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Reads an Ini file, returning matching items.
PARAMETERS
-InputObject <PSObject>
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Name <String>
The name of the field to retrieve.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Section <String>
The section a setting resides within. If this value is not set the value will be removed from all sections.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
The path to an ini file.
Required? true
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Value <String>
The value may be defined to describe the item. Wildcards are supported.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LiteralValue <String>
The literal value may be defined to absolutely describe the item. Wildcards are not supported.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Void
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-IniFileItem -Name somename -Section somesection -Path somefile.ini
Remove somename from the somesection section in somefile.ini.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Remove-IniFileItem -Name somename -Path somefile.ini
Remove somename from all sections in somefile.ini.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Remove-IniFileItem -Name extension -Value imap -Section PHP
Remove extension, when the value is imap, from the section PHP.
RELATED LINKS
SYNOPSIS
Get an item from an Ini file.
SYNTAX
Remove-IniFileItem [-Name] <String> [[-Section] <String>] [-Path] <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
Remove-IniFileItem -InputObject <PSObject> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-IniFileItem [-Name] <String> [[-Section] <String>] [-Path] <String> -LiteralValue <String> [-WhatIf]
[-Confirm] [<CommonParameters>]
Remove-IniFileItem [-Name] <String> [[-Section] <String>] [-Path] <String> -Value <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Reads an Ini file, returning matching items.
PARAMETERS
-InputObject <PSObject>
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Name <String>
The name of the field to retrieve.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Section <String>
The section a setting resides within. If this value is not set the value will be removed from all sections.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
The path to an ini file.
Required? true
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Value <String>
The value may be defined to describe the item. Wildcards are supported.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LiteralValue <String>
The literal value may be defined to absolutely describe the item. Wildcards are not supported.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Void
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-IniFileItem -Name somename -Section somesection -Path somefile.ini
Remove somename from the somesection section in somefile.ini.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Remove-IniFileItem -Name somename -Path somefile.ini
Remove somename from all sections in somefile.ini.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Remove-IniFileItem -Name extension -Value imap -Section PHP
Remove extension, when the value is imap, from the section PHP.
RELATED LINKS