Skip to main content
Version: 4.1.x

Get-ADTIniSection

SYNOPSIS

Parses an INI file and returns the specified section as an ordered hashtable of key value pairs.

SYNTAX

Get-ADTIniSection [-FilePath] <String> [-Section] <String> [<CommonParameters>]

DESCRIPTION

Parses an INI file and returns the specified section as an ordered hashtable of key value pairs.

EXAMPLES

EXAMPLE 1

Get-ADTIniSection -FilePath "$env:ProgramFilesX86\IBM\Notes\notes.ini" -Section 'Notes'

This example retrieves the section of the 'Notes' of the specified INI file.

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

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

You cannot pipe objects to this function.

OUTPUTS

Collections.Specialized.OrderedDictionary

Returns the value of the specified section and key.

NOTES

An active ADT session is NOT required to use this function.

Tags: psadt
Website: https://psappdeploytoolkit.com
Copyright: (C) 2025 PSAppDeployToolkit Team (Sean Lillis, Dan Cunningham, Muhammad Mashwani, Mitch Richters, Dan Gough).
License: https://opensource.org/license/lgpl-3-0

https://psappdeploytoolkit.com/docs/reference/functions/Get-ADTIniValue