Get-MtSysvolContent
SYNOPSIS
Reads and analyzes one Group Policy Object from SYSVOL.
SYNTAX
Get-MtSysvolContent [[-Operation] <String>] [-GpoGuid] <String> [[-RelativePath] <String>]
[[-MaxFileBytes] <Int64>] [[-MaxGpoBytes] <Int64>] [[-TimeoutSeconds] <Int32>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Provides a single private Connect, List, ReadText, and ReadBytes transport contract across Windows native SMB and Unix smbclient. It uses the resolved Active Directory server, domain, and credential in the Maester session.
Connect validates access, lists bounded files, and parses GPT.INI, every XML file below the GPO, and GptTmpl.inf. No password values are returned. Reads reject unsafe paths and throw instead of truncating files over 10 MiB or a GPO inventory over 100 MiB.
EXAMPLES
EXAMPLE 1
Get-MtSysvolContent -Operation Connect -GpoGuid '{00000000-0000-0000-0000-000000000000}'
EXAMPLE 2
Get-MtSysvolContent -Operation ReadText -GpoGuid '{00000000-0000-0000-0000-000000000000}' -RelativePath 'GPT.INI'
PARAMETERS
-Operation
Connect returns a complete analysis; List returns normalized file metadata; ReadText and ReadBytes return one bounded file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: Connect
Accept pipeline input: False
Accept wildcard characters: False
-GpoGuid
GPO identifier, with or without braces.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RelativePath
Relative file path required by ReadText and ReadBytes.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MaxFileBytes
Single-file bound. Defaults to 10 MiB and cannot exceed 10 MiB.
Type: Int64
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: 10485760
Accept pipeline input: False
Accept wildcard characters: False
-MaxGpoBytes
Aggregate GPO bound. Defaults to 100 MiB and cannot exceed 100 MiB.
Type: Int64
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: 104857600
Accept pipeline input: False
Accept wildcard characters: False
-TimeoutSeconds
Unix smbclient timeout for each operation.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: 60
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.
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.