Configuration driven Active Directory management.
Registers an SMB share that should exist on DCs.
Register-DCShare [-Name] <String> [-Path] <String> [[-Description] <String>] [[-FullAccess] <String[]>]
[[-WriteAccess] <String[]>] [[-ReadAccess] <String[]>] [[-AccessMode] <String>] [[-ServerRole] <String>]
[[-ContextName] <String>] [<CommonParameters>]
Registers an SMB share that should exist on DCs.
Get-Content .\shares.json | ConvertFrom-Json | Write-Output | Register-DCShare
Reads all share definitions from json and imports the definitions.
The name of the share. Supports string resolution.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The path the share points to. Supports string resolution.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The description of the share. Supports string resolution.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The principals to grant full access to. Supports string resolution.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The principals to grant write access to. Supports string resolution.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The principals to grant read access to. Supports string resolution.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
How share access rules are processed. Supports three configurations:
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: Constrained
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
What domain controller to apply this to:
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: All
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The name of the context defining the setting. This allows determining the configuration set that provided this setting. Used by the ADMF, available to any other configuration management solution.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: <Undefined>
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.