New-BISQLSecGroup
SYNOPSIS
Create a new SQL Security Group for BI servers and assign it to a database.
SYNTAX
New-BISQLSecGroup [-Ticket] <String> [-dbname] <String> [-biserver] <String> [-environment] <String>
[-Type] <String> [<CommonParameters>]
DESCRIPTION
This function creates a new SQL Security Group in Active Directory and assigns it to a specified SQL Server database. It checks if the database exists, creates the security group in AD if it does not already exist, and assigns the appropriate permissions based on the specified type. BI databases deviate naming standards. On DV & QA the databases have the same naming as on PR
EXAMPLES
EXAMPLE 1
Creates a new SQL Security Group with read-only permissions for the "TestDB" database on server srvbixxx.
EXAMPLE 2
Creates a new SQL Security Group with admin permissions for the "ProdDB" database on server srvbixxx.
EXAMPLE 3
Creates a new SQL Security Group with read/write/execute permissions for the "FinanceDB" database on server srvbixxx.
PARAMETERS
-Ticket
The ticket ID associated with the creation of the SQL Security Group.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-dbname
The name of the database where the SQL Security Group will be assigned.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-biserver
The hostname of the SQL Server where the database is to be found.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-environment
The environment that will be used in generating the group name: DV, QA or PR
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Type
The type of SQL Security Group to create. Valid values are: - A: Admin (db_owner) permissions. - D: Database owner permissions. - R: Read-only permissions. - W: Read/Write/Execute permissions.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 5
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.