From 323564a8acd66249aa0c6898b2edc7d3c9e0eee2 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 10 Nov 2023 04:04:59 +0000 Subject: [PATCH] Updating examples --- .../New-MgBetaSecurityAttackSimulation.md | 46 +++++++++++++++---- .../New-MgSecurityAttackSimulation.md | 46 +++++++++++++++---- 2 files changed, 72 insertions(+), 20 deletions(-) diff --git a/src/Security/beta/examples/New-MgBetaSecurityAttackSimulation.md b/src/Security/beta/examples/New-MgBetaSecurityAttackSimulation.md index f6c6949389e..395958584c3 100644 --- a/src/Security/beta/examples/New-MgBetaSecurityAttackSimulation.md +++ b/src/Security/beta/examples/New-MgBetaSecurityAttackSimulation.md @@ -1,17 +1,43 @@ -### Example 1: {{ Add title here }} +### Example 1: Code snippet + ```powershell - PS C:\> {{ Add code here }} -{{ Add output here }} -``` +Import-Module Microsoft.Graph.Beta.Security -{{ Add description here }} +$params = @{ + displayName = "Graph Simulation" + "payload@odata.bind" = "https://graph.microsoft.com/beta/security/attacksimulation/payloads/12345678-9abc-def0-123456789a" + "loginPage@odata.bind" = "https://graph.microsoft.com/beta/security/attacksimulation/loginPages/1w345678-9abc-def0-123456789a" + "landingPage@odata.bind" = "https://graph.microsoft.com/beta/security/attacksimulation/landingPages/1c345678-9abc-def0-123456789a" + createdBy = @{ + email = "john@contoso.com" + } + durationInDays = "3" + attackTechnique = "credentialHarvesting" + status = "scheduled" + includedAccountTarget = @{ + "@odata.type" = "#microsoft.graph.addressBookAccountTargetContent" + type = "addressBook" + accountTargetEmails = @( + "john@contoso.com" + ) + } + trainingSetting = @{ + settingType = "noTraining" + } + endUserNotificationSetting = @{ + notificationPreference = "microsoft" + settingType = "noTraining" + positiveReinforcement = @{ + deliveryPreference = "deliverAfterCampaignEnd" + endUserNotification = "https://graph.microsoft.com/beta/security/attacksimulation/endUserNotifications/1ewer3678-9abc-def0-123456789a" + defaultLanguage = "en" + } + } +} -### Example 2: {{ Add title here }} -```powershell - PS C:\> {{ Add code here }} +New-MgBetaSecurityAttackSimulation -BodyParameter $params -{{ Add output here }} ``` +This example shows how to use the New-MgBetaSecurityAttackSimulation Cmdlet. -{{ Add description here }} diff --git a/src/Security/v1.0/examples/New-MgSecurityAttackSimulation.md b/src/Security/v1.0/examples/New-MgSecurityAttackSimulation.md index f6c6949389e..df270926b93 100644 --- a/src/Security/v1.0/examples/New-MgSecurityAttackSimulation.md +++ b/src/Security/v1.0/examples/New-MgSecurityAttackSimulation.md @@ -1,17 +1,43 @@ -### Example 1: {{ Add title here }} +### Example 1: Code snippet + ```powershell - PS C:\> {{ Add code here }} -{{ Add output here }} -``` +Import-Module Microsoft.Graph.Security -{{ Add description here }} +$params = @{ + displayName = "Graph Simulation" + "payload@odata.bind" = "https://graph.microsoft.com/v1.0/security/attacksimulation/payloads/12345678-9abc-def0-123456789a" + "loginPage@odata.bind" = "https://graph.microsoft.com/v1.0/security/attacksimulation/loginPages/1w345678-9abc-def0-123456789a" + "landingPage@odata.bind" = "https://graph.microsoft.com/v1.0/security/attacksimulation/landingPages/1c345678-9abc-def0-123456789a" + createdBy = @{ + email = "john@contoso.com" + } + durationInDays = "3" + attackTechnique = "credentialHarvesting" + status = "scheduled" + includedAccountTarget = @{ + "@odata.type" = "#microsoft.graph.addressBookAccountTargetContent" + type = "addressBook" + accountTargetEmails = @( + "john@contoso.com" + ) + } + trainingSetting = @{ + settingType = "noTraining" + } + endUserNotificationSetting = @{ + notificationPreference = "microsoft" + settingType = "noTraining" + positiveReinforcement = @{ + deliveryPreference = "deliverAfterCampaignEnd" + endUserNotification = "https://graph.microsoft.com/v1.0/security/attacksimulation/endUserNotifications/1ewer3678-9abc-def0-123456789a" + defaultLanguage = "en" + } + } +} -### Example 2: {{ Add title here }} -```powershell - PS C:\> {{ Add code here }} +New-MgSecurityAttackSimulation -BodyParameter $params -{{ Add output here }} ``` +This example shows how to use the New-MgSecurityAttackSimulation Cmdlet. -{{ Add description here }}