Skip to content

Commit e50f593

Browse files
authored
Merge pull request #2426 from microsoftgraph/WeeklyExamplesUpdate/202311100308
[v2] Examples Update
2 parents b898835 + 0930a32 commit e50f593

File tree

2 files changed

+72
-20
lines changed

2 files changed

+72
-20
lines changed

src/Security/beta/examples/New-MgBetaSecurityAttackSimulation.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
1-
### Example 1: {{ Add title here }}
1+
### Example 1: Code snippet
2+
23
```powershell
3-
PS C:\> {{ Add code here }}
44
5-
{{ Add output here }}
6-
```
5+
Import-Module Microsoft.Graph.Beta.Security
76
8-
{{ Add description here }}
7+
$params = @{
8+
displayName = "Graph Simulation"
9+
"payload@odata.bind" = "https://graph.microsoft.com/beta/security/attacksimulation/payloads/12345678-9abc-def0-123456789a"
10+
"loginPage@odata.bind" = "https://graph.microsoft.com/beta/security/attacksimulation/loginPages/1w345678-9abc-def0-123456789a"
11+
"landingPage@odata.bind" = "https://graph.microsoft.com/beta/security/attacksimulation/landingPages/1c345678-9abc-def0-123456789a"
12+
createdBy = @{
13+
email = "john@contoso.com"
14+
}
15+
durationInDays = "3"
16+
attackTechnique = "credentialHarvesting"
17+
status = "scheduled"
18+
includedAccountTarget = @{
19+
"@odata.type" = "#microsoft.graph.addressBookAccountTargetContent"
20+
type = "addressBook"
21+
accountTargetEmails = @(
22+
"john@contoso.com"
23+
)
24+
}
25+
trainingSetting = @{
26+
settingType = "noTraining"
27+
}
28+
endUserNotificationSetting = @{
29+
notificationPreference = "microsoft"
30+
settingType = "noTraining"
31+
positiveReinforcement = @{
32+
deliveryPreference = "deliverAfterCampaignEnd"
33+
endUserNotification = "https://graph.microsoft.com/beta/security/attacksimulation/endUserNotifications/1ewer3678-9abc-def0-123456789a"
34+
defaultLanguage = "en"
35+
}
36+
}
37+
}
938
10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
39+
New-MgBetaSecurityAttackSimulation -BodyParameter $params
1340
14-
{{ Add output here }}
1541
```
42+
This example shows how to use the New-MgBetaSecurityAttackSimulation Cmdlet.
1643

17-
{{ Add description here }}

src/Security/v1.0/examples/New-MgSecurityAttackSimulation.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
1-
### Example 1: {{ Add title here }}
1+
### Example 1: Code snippet
2+
23
```powershell
3-
PS C:\> {{ Add code here }}
44
5-
{{ Add output here }}
6-
```
5+
Import-Module Microsoft.Graph.Security
76
8-
{{ Add description here }}
7+
$params = @{
8+
displayName = "Graph Simulation"
9+
"payload@odata.bind" = "https://graph.microsoft.com/v1.0/security/attacksimulation/payloads/12345678-9abc-def0-123456789a"
10+
"loginPage@odata.bind" = "https://graph.microsoft.com/v1.0/security/attacksimulation/loginPages/1w345678-9abc-def0-123456789a"
11+
"landingPage@odata.bind" = "https://graph.microsoft.com/v1.0/security/attacksimulation/landingPages/1c345678-9abc-def0-123456789a"
12+
createdBy = @{
13+
email = "john@contoso.com"
14+
}
15+
durationInDays = "3"
16+
attackTechnique = "credentialHarvesting"
17+
status = "scheduled"
18+
includedAccountTarget = @{
19+
"@odata.type" = "#microsoft.graph.addressBookAccountTargetContent"
20+
type = "addressBook"
21+
accountTargetEmails = @(
22+
"john@contoso.com"
23+
)
24+
}
25+
trainingSetting = @{
26+
settingType = "noTraining"
27+
}
28+
endUserNotificationSetting = @{
29+
notificationPreference = "microsoft"
30+
settingType = "noTraining"
31+
positiveReinforcement = @{
32+
deliveryPreference = "deliverAfterCampaignEnd"
33+
endUserNotification = "https://graph.microsoft.com/v1.0/security/attacksimulation/endUserNotifications/1ewer3678-9abc-def0-123456789a"
34+
defaultLanguage = "en"
35+
}
36+
}
37+
}
938
10-
### Example 2: {{ Add title here }}
11-
```powershell
12-
PS C:\> {{ Add code here }}
39+
New-MgSecurityAttackSimulation -BodyParameter $params
1340
14-
{{ Add output here }}
1541
```
42+
This example shows how to use the New-MgSecurityAttackSimulation Cmdlet.
1643

17-
{{ Add description here }}

0 commit comments

Comments
 (0)