Remove‑SqlDscAgentOperator - dsccommunity/SqlServerDsc GitHub Wiki
Removes a SQL Agent Operator.
Remove-SqlDscAgentOperator -ServerObject <Server> -Name <String> [-Force] [-Refresh]
[-WhatIf] [-Confirm] [<CommonParameters>]
Remove-SqlDscAgentOperator -OperatorObject <Operator> [-Force] [-WhatIf]
[-Confirm] [<CommonParameters>]
This command removes a SQL Agent Operator from a SQL Server Database Engine instance.
$serverObject = Connect-SqlDscDatabaseEngine -InstanceName 'MyInstance'
Remove-SqlDscAgentOperator -ServerObject $serverObject -Name 'MyOperator'
Removes the SQL Agent Operator named 'MyOperator'.
$serverObject = Connect-SqlDscDatabaseEngine -InstanceName 'MyInstance'
$serverObject | Remove-SqlDscAgentOperator -Name 'MyOperator'
Removes the SQL Agent Operator using pipeline input.
$operatorObject = Get-SqlDscAgentOperator -ServerObject $serverObject -Name 'MyOperator'
$operatorObject | Remove-SqlDscAgentOperator
Removes the SQL Agent Operator using operator object pipeline input.
$serverObject = Connect-SqlDscDatabaseEngine -InstanceName 'MyInstance'
Remove-SqlDscAgentOperator -ServerObject $serverObject -Name 'MyOperator' -Refresh
Removes the SQL Agent Operator named 'MyOperator' with explicit refresh of the operator object.
Specifies that the operator should be removed without any confirmation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the SQL Agent Operator to remove.
Type: String
Parameter Sets: ByName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the SQL Agent Operator object to remove.
Type: Operator
Parameter Sets: ByObject
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies that the SQL Agent Operator object should be refreshed before removal. This is only used when specifying the operator by name.
Type: SwitchParameter
Parameter Sets: ByName
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Specifies current server connection object.
Type: Server
Parameter Sets: ByName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Prompts 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: False
Shows 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: 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.