Skip to main content
Version: 2.2.0

Invoke-MtSysvolWindowsAdapter

SYNOPSIS​

Executes one bounded SYSVOL operation through a temporary Windows PSDrive.

SYNTAX​

Invoke-MtSysvolWindowsAdapter [-Operation] <String> [-Server] <String> [-Domain] <String> [-GpoGuid] <String>
[[-RelativePath] <String>] [[-Credential] <PSCredential>] [-MaxFileBytes] <Int64>
[-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION​

Maps the resolved server's SYSVOL share with the session credential and always removes the temporary drive in a finally block.

EXAMPLES​

EXAMPLE 1​

Invoke-MtSysvolWindowsAdapter -Operation Connect -Server dc -Domain contoso.com -GpoGuid '{00000000-0000-0000-0000-000000000000}'

PARAMETERS​

-Operation​

Connect, List, ReadText, or ReadBytes.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Server​

Resolved domain controller.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Domain​

Resolved domain DNS name.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GpoGuid​

Brace-delimited GPO GUID.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RelativePath​

Validated relative file path.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential​

Session credential.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxFileBytes​

Maximum accepted file size.

Type: Int64
Parameter Sets: (All)
Aliases:

Required: True
Position: 7
Default value: 0
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.

INPUTS​

OUTPUTS​

System.Object[]​

System.Boolean​

System.String​

System.Byte[]​

NOTES​