Skip to content

Commit e429182

Browse files
authored
New/Remove-DbaAgentOperator, better docs (#9621)
1 parent 5291b95 commit e429182

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

public/New-DbaAgentOperator.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,16 @@ function New-DbaAgentOperator {
8787
https://dbatools.io/New-DbaAgentOperator
8888
8989
.EXAMPLE
90-
PS:\> New-DbaAgentOperator -SqlInstance sql01 -Operator DBA -EmailAddress [email protected] -PagerDay Everyday -Force
90+
PS C:\> New-DbaAgentOperator -SqlInstance sql01 -Operator DBA -EmailAddress [email protected] -PagerDay Everyday -Force
9191
9292
This sets a new operator named DBA with the above email address with default values to alerts everyday
9393
for all hours of the day.
9494
9595
.EXAMPLE
96-
PS:\> New-DbaAgentOperator -SqlInstance sql01 -Operator DBA -EmailAddress [email protected] -NetSendAddress dbauser1 -PagerAddress [email protected] -PagerDay Everyday -SaturdayStartTime 070000 -SaturdayEndTime 180000 -SundayStartTime 080000 -SundayEndTime 170000 -WeekdayStartTime 060000 -WeekdayEndTime 190000
96+
PS C:\> New-DbaAgentOperator -SqlInstance sql01 -Operator DBA -EmailAddress [email protected] `
97+
>> -NetSendAddress dbauser1 -PagerAddress [email protected] -PagerDay Everyday `
98+
>> -SaturdayStartTime 070000 -SaturdayEndTime 180000 -SundayStartTime 080000 `
99+
>> -SundayEndTime 170000 -WeekdayStartTime 060000 -WeekdayEndTime 190000
97100
98101
Creates a new operator named DBA on the sql01 instance with email address [email protected], net send address of dbauser1, pager address of [email protected], page day as every day, Saturday start time of 7am, Saturday end time of 6pm, Sunday start time of 8am, Sunday end time of 5pm, Weekday start time of 6am, and Weekday end time of 7pm.
99102
#>

public/Remove-DbaAgentOperator.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ function Remove-DbaAgentOperator {
5151
https://dbatools.io/Remove-DbaAgentOperator
5252
5353
.EXAMPLE
54-
PS:\> Remove-DbaAgentOperator -SqlInstance sql01 -Operator DBA
54+
PS C:\> Remove-DbaAgentOperator -SqlInstance sql01 -Operator DBA
5555
5656
This removes an operator named DBA from the instance.
5757
5858
.EXAMPLE
59-
PS C:\> Get-DbaAgentOperator -SqlInstance SRV1 | Out-GridView -Title 'Select SQL Agent operator(s) to drop' -OutputMode Multiple | Remove-DbaAgentOperator
59+
PS C:\> Get-DbaAgentOperator -SqlInstance SRV1 | Out-GridView -Title 'Select SQL Agent operator(s) to drop' -OutputMode Multiple | Remove-DbaAgentOperator
6060
6161
Using a pipeline this command gets all SQL Agent operator(s) on SRV1, lets the user select those to remove and then removes the selected SQL Agent alert category(-ies).
6262

0 commit comments

Comments
 (0)