|
1 |
| -### Example 1: {{ Add title here }} |
| 1 | +### Example 1: Code snippet |
| 2 | + |
2 | 3 | ```powershell
|
3 |
| - PS C:\> {{ Add code here }} |
4 | 4 |
|
5 |
| -{{ Add output here }} |
6 |
| -``` |
| 5 | +Import-Module Microsoft.Graph.Beta.Security |
7 | 6 |
|
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 | +} |
9 | 38 |
|
10 |
| -### Example 2: {{ Add title here }} |
11 |
| -```powershell |
12 |
| - PS C:\> {{ Add code here }} |
| 39 | +New-MgBetaSecurityAttackSimulation -BodyParameter $params |
13 | 40 |
|
14 |
| -{{ Add output here }} |
15 | 41 | ```
|
| 42 | +This example shows how to use the New-MgBetaSecurityAttackSimulation Cmdlet. |
16 | 43 |
|
17 |
| -{{ Add description here }} |
|
0 commit comments