Add‑SqlDscFileGroup - dsccommunity/SqlServerDsc GitHub Wiki
Adds one or more FileGroup objects to a Database object.
Add-SqlDscFileGroup [-Database] <Database> [-FileGroup] <FileGroup[]> [-PassThru] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
This command adds one or more FileGroup objects to a Database object's FileGroups collection. This is useful when you have created FileGroup objects using New-SqlDscFileGroup and want to associate them with a Database.
Add-SqlDscFileGroup -Database $database -FileGroup $fileGroup
Adds a single FileGroup to the Database.
$fileGroups | Add-SqlDscFileGroup -Database $database -PassThru
Adds multiple FileGroups to the Database via pipeline and returns the FileGroup objects.
Specifies the Database object to which the FileGroups will be added.
Type: Database
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies one or more FileGroup objects to add to the Database. This parameter accepts pipeline input.
Type: FileGroup[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseSpecifies that the FileGroup should be added without confirmation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseReturns the FileGroup objects that were added to the Database.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.