From f75209693575930bdd2212c2db1ea5da98cce58c Mon Sep 17 00:00:00 2001 From: Paolo Matarazzo <74918781+paolomatarazzo@users.noreply.github.com> Date: Thu, 15 Feb 2024 23:00:01 +0100 Subject: [PATCH] Delete quickstart-restricted-experience-xml.md file --- .../kiosk/assigned-access-quickstart-kiosk.md | 72 +------------- ...access-quickstart-restricted-experience.md | 98 +------------------ ...assigned-access-quickstart-kiosk-intune.md | 14 +++ .../assigned-access-quickstart-kiosk-ps.md | 64 ++++++++++++ .../assigned-access-quickstart-kiosk-xml.md | 29 ++++++ ...quickstart-restricted-experience-intune.md | 14 +++ ...ess-quickstart-restricted-experience-ps.md | 94 ++++++++++++++++++ ...s-quickstart-restricted-experience-xml.md} | 0 8 files changed, 224 insertions(+), 161 deletions(-) create mode 100644 windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-intune.md create mode 100644 windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-ps.md create mode 100644 windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-xml.md create mode 100644 windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-intune.md create mode 100644 windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-ps.md rename windows/configuration/kiosk/includes/{quickstart-restricted-experience-xml.md => assigned-access-quickstart-restricted-experience-xml.md} (100%) diff --git a/windows/configuration/kiosk/assigned-access-quickstart-kiosk.md b/windows/configuration/kiosk/assigned-access-quickstart-kiosk.md index f8689449ef..7b766d58c4 100644 --- a/windows/configuration/kiosk/assigned-access-quickstart-kiosk.md +++ b/windows/configuration/kiosk/assigned-access-quickstart-kiosk.md @@ -36,12 +36,7 @@ Arguments: --no-first-run --kiosk https://maps.cltairport.com/ --kiosk-idle-time > > When using this call, authenticate to your tenant in the Graph Explorer window. If it's the first time using Graph Explorer, you may need to authorize the application to access your tenant or to modify the existing permissions. This graph call requires *DeviceManagementConfiguration.ReadWrite.All* permissions. -```msgraph-interactive -POST https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations -Content-Type: application/json - -{ "id": "00-0000-0000-0000-000000000000", "displayName": "_MSLearn_Example", "description": "Collection of settings for Assigned Access", "roleScopeTagIds": [ "0" ], "@odata.type": "#microsoft.graph.windows10CustomConfiguration", "omaSettings": [ { "@odata.type": "#microsoft.graph.omaSettingString", "displayName": "AssignedAccess_Configuration", "description": null, "omaUri": "./Vendor/MSFT/AssignedAccess/Configuration", "secretReferenceValueId": null, "isEncrypted": true, "value": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n" } ] } -``` +[!INCLUDE [assigned-access-quickstart-kiosk-intune](includes/assigned-access-quickstart-kiosk-intune.md)] [!INCLUDE [intune-custom-settings-2](../../../includes/configure/intune-custom-settings-2.md)] @@ -50,7 +45,7 @@ Alternatively, you can configure devices using a [custom policy][MEM-1] with the - **Setting:** `./Vendor/MSFT/AssignedAccess/Configuration` - **Value:** -[!INCLUDE [quickstart-restricted-experience-xml](includes/quickstart-restricted-experience-xml.md)] +[!INCLUDE [assigned-access-quickstart-kiosk-xml](includes/assigned-access-quickstart-kiosk-xml.md)] #### [:::image type="icon" source="../images/icons/provisioning-package.svg"::: **PPKG**](#tab/ppkg) @@ -59,7 +54,7 @@ Alternatively, you can configure devices using a [custom policy][MEM-1] with the - **Path:** `AssignedAccess/MultiAppAssignedAccessSettings` - **Value:** -[!INCLUDE [quickstart-restricted-experience-xml](includes/quickstart-restricted-experience-xml.md)] +[!INCLUDE [assigned-access-quickstart-kiosk-xmll](includes/assigned-access-quickstart-kiosk-xml.md)] [!INCLUDE [provisioning-package-2](../../../includes/configure/provisioning-package-2.md)] @@ -67,62 +62,7 @@ Alternatively, you can configure devices using a [custom policy][MEM-1] with the [!INCLUDE [powershell-wmi-bridge-1](../../../includes/configure/powershell-wmi-bridge-1.md)] -```powershell -$assignedAccessConfiguration = @" - - - - - - - - - - - - - - - -"@ - -$eventLogFilterHashTable = @{ - ProviderName = "Microsoft-Windows-AssignedAccess"; - StartTime = Get-Date -Millisecond 0 -} - -$namespaceName="root\cimv2\mdm\dmmap" -$className="MDM_AssignedAccess" -$obj = Get-CimInstance -Namespace $namespaceName -ClassName $className -$obj.Configuration = [System.Net.WebUtility]::HtmlEncode($assignedAccessConfiguration) -$obj = Set-CimInstance -CimInstance $obj -ErrorVariable cimSetError -ErrorAction SilentlyContinue -if($cimSetError) { - Write-Output "An ERROR occurred. Displaying error record and attempting to retrieve error logs...`n" - Write-Error -ErrorRecord $cimSetError[0] - - $timeout = New-TimeSpan -Seconds 30 - $stopwatch = [System.Diagnostics.Stopwatch]::StartNew() - do{ - $events = Get-WinEvent -FilterHashtable $eventLogFilterHashTable -ErrorAction Ignore - } until ($events.Count -or $stopwatch.Elapsed -gt $timeout) # wait for the log to be available - - if($events.Count) { - $events | ForEach-Object { - Write-Output "$($_.TimeCreated) [$($_.LevelDisplayName.ToUpper())] $($_.Message -replace "`n|`r")" - } - } else { - Write-Warning "Timed-out attempting to retrieve event logs..." - } - - Exit 1 -} - -Write-Output "Successfully applied Assigned Access configuration" -``` +[!INCLUDE [assigned-access-quickstart-kiosk-ps](includes/assigned-access-quickstart-kiosk-ps.md)] [!INCLUDE [powershell-wmi-bridge-2](../../../includes/configure/powershell-wmi-bridge-2.md)] @@ -130,9 +70,7 @@ Write-Output "Successfully applied Assigned Access configuration" ## User experience -After the settings are applied, reboot the device. A user account named `Library Kiosk` is automatically signed in, with access to a limited set of applications, which are pinned to the Start menu. - -:::image type="content" source="images/quickstart-restricted-experience.png" alt-text="Screenshot of the Windows desktop used for the quickstart." border="false"::: +After the settings are applied, reboot the device. A user account named `Airport Kiosk` is automatically signed in, opening Microsoft Edge with an airport map. ## Next steps diff --git a/windows/configuration/kiosk/assigned-access-quickstart-restricted-experience.md b/windows/configuration/kiosk/assigned-access-quickstart-restricted-experience.md index 4a573c9090..40785d41d1 100644 --- a/windows/configuration/kiosk/assigned-access-quickstart-restricted-experience.md +++ b/windows/configuration/kiosk/assigned-access-quickstart-restricted-experience.md @@ -36,12 +36,7 @@ The examples can be modified to fit your specific requirements. For example, you > > When using this call, authenticate to your tenant in the Graph Explorer window. If it's the first time using Graph Explorer, you may need to authorize the application to access your tenant or to modify the existing permissions. This graph call requires *DeviceManagementConfiguration.ReadWrite.All* permissions. -```msgraph-interactive -POST https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations -Content-Type: application/json - -{ "id": "00-0000-0000-0000-000000000000", "displayName": "_MSLearn_Example", "description": "Collection of settings for Assigned Access", "roleScopeTagIds": [ "0" ], "@odata.type": "#microsoft.graph.windows10CustomConfiguration", "omaSettings": [ { "@odata.type": "#microsoft.graph.omaSettingString", "displayName": "AssignedAccess_Configuration", "description": null, "omaUri": "./Vendor/MSFT/AssignedAccess/Configuration", "secretReferenceValueId": null, "isEncrypted": true, "value": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n" } ] } -``` +[!INCLUDE [assigned-access-quickstart-restricted-experience-intune](includes/assigned-access-quickstart-restricted-experience-intune.md)] [!INCLUDE [intune-custom-settings-2](../../../includes/configure/intune-custom-settings-2.md)] @@ -50,7 +45,7 @@ Alternatively, you can configure devices using a [custom policy][MEM-1] with the - **Setting:** `./Vendor/MSFT/AssignedAccess/Configuration` - **Value:** -[!INCLUDE [quickstart-restricted-experience-xml](includes/quickstart-restricted-experience-xml.md)] +[!INCLUDE [assigned-access-quickstart-restricted-experience-xml.md](includes/assigned-access-quickstart-restricted-experience-xml.md)] #### [:::image type="icon" source="../images/icons/provisioning-package.svg"::: **PPKG**](#tab/ppkg) @@ -59,7 +54,7 @@ Alternatively, you can configure devices using a [custom policy][MEM-1] with the - **Path:** `AssignedAccess/MultiAppAssignedAccessSettings` - **Value:** -[!INCLUDE [quickstart-restricted-experience-xml](includes/quickstart-restricted-experience-xml.md)] +[!INCLUDE [assigned-access-quickstart-restricted-experience-xml.md](includes/assigned-access-quickstart-restricted-experience-xml.md)] [!INCLUDE [provisioning-package-2](../../../includes/configure/provisioning-package-2.md)] @@ -67,92 +62,7 @@ Alternatively, you can configure devices using a [custom policy][MEM-1] with the [!INCLUDE [powershell-wmi-bridge-1](../../../includes/configure/powershell-wmi-bridge-1.md)] -```powershell -$assignedAccessConfiguration = @" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"@ - -$eventLogFilterHashTable = @{ - ProviderName = "Microsoft-Windows-AssignedAccess"; - StartTime = Get-Date -Millisecond 0 -} - -$namespaceName="root\cimv2\mdm\dmmap" -$className="MDM_AssignedAccess" -$obj = Get-CimInstance -Namespace $namespaceName -ClassName $className -$obj.Configuration = [System.Net.WebUtility]::HtmlEncode($assignedAccessConfiguration) -$obj = Set-CimInstance -CimInstance $obj -ErrorVariable cimSetError -ErrorAction SilentlyContinue -if($cimSetError) { - Write-Output "An ERROR occurred. Displaying error record and attempting to retrieve error logs...`n" - Write-Error -ErrorRecord $cimSetError[0] - - $timeout = New-TimeSpan -Seconds 30 - $stopwatch = [System.Diagnostics.Stopwatch]::StartNew() - do{ - $events = Get-WinEvent -FilterHashtable $eventLogFilterHashTable -ErrorAction Ignore - } until ($events.Count -or $stopwatch.Elapsed -gt $timeout) # wait for the log to be available - - if($events.Count) { - $events | ForEach-Object { - Write-Output "$($_.TimeCreated) [$($_.LevelDisplayName.ToUpper())] $($_.Message -replace "`n|`r")" - } - } else { - Write-Warning "Timed-out attempting to retrieve event logs..." - } - - Exit 1 -} - -Write-Output "Successfully applied Assigned Access configuration" -``` +[!INCLUDE [assigned-access-quickstart-restricted-experience-ps](includes/assigned-access-quickstart-restricted-experience-ps.md)] [!INCLUDE [powershell-wmi-bridge-2](../../../includes/configure/powershell-wmi-bridge-2.md)] diff --git a/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-intune.md b/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-intune.md new file mode 100644 index 0000000000..dbe8a4d3a0 --- /dev/null +++ b/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-intune.md @@ -0,0 +1,14 @@ +--- +author: paolomatarazzo +ms.author: paoloma +ms.date: 02/05/2024 +ms.topic: include +ms.prod: windows-client +--- + +```msgraph-interactive +POST https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations +Content-Type: application/json + +{ "id": "00000000-0000-0000-0000-000000000000", "displayName": "_MSLearn_Example_Kiosk - Assigned Access", "description": "This is a sample policy created from an article on learn.microsoft.com.", "roleScopeTagIds": [ "0" ], "@odata.type": "#microsoft.graph.windows10CustomConfiguration", "omaSettings": [ { "omaUri": "./Vendor/MSFT/AssignedAccess/Configuration", "displayName": "Configuration", "@odata.type": "#microsoft.graph.omaSettingString", "value": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n" } ] } +``` \ No newline at end of file diff --git a/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-ps.md b/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-ps.md new file mode 100644 index 0000000000..6a9f83025a --- /dev/null +++ b/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-ps.md @@ -0,0 +1,64 @@ +--- +author: paolomatarazzo +ms.author: paoloma +ms.date: 02/05/2024 +ms.topic: include +ms.prod: windows-client +--- + +```powershell +$assignedAccessConfiguration = @" + + + + + + + + + + + + + + + +"@ + +$eventLogFilterHashTable = @{ + ProviderName = "Microsoft-Windows-AssignedAccess"; + StartTime = Get-Date -Millisecond 0 +} + +$namespaceName="root\cimv2\mdm\dmmap" +$className="MDM_AssignedAccess" +$obj = Get-CimInstance -Namespace $namespaceName -ClassName $className +$obj.Configuration = [System.Net.WebUtility]::HtmlEncode($assignedAccessConfiguration) +$obj = Set-CimInstance -CimInstance $obj -ErrorVariable cimSetError -ErrorAction SilentlyContinue +if($cimSetError) { + Write-Output "An ERROR occurred. Displaying error record and attempting to retrieve error logs...`n" + Write-Error -ErrorRecord $cimSetError[0] + + $timeout = New-TimeSpan -Seconds 30 + $stopwatch = [System.Diagnostics.Stopwatch]::StartNew() + do{ + $events = Get-WinEvent -FilterHashtable $eventLogFilterHashTable -ErrorAction Ignore + } until ($events.Count -or $stopwatch.Elapsed -gt $timeout) # wait for the log to be available + + if($events.Count) { + $events | ForEach-Object { + Write-Output "$($_.TimeCreated) [$($_.LevelDisplayName.ToUpper())] $($_.Message -replace "`n|`r")" + } + } else { + Write-Warning "Timed-out attempting to retrieve event logs..." + } + + Exit 1 +} + +Write-Output "Successfully applied Assigned Access configuration" +``` \ No newline at end of file diff --git a/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-xml.md b/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-xml.md new file mode 100644 index 0000000000..cfa269931e --- /dev/null +++ b/windows/configuration/kiosk/includes/assigned-access-quickstart-kiosk-xml.md @@ -0,0 +1,29 @@ +--- +author: paolomatarazzo +ms.author: paoloma +ms.date: 02/05/2024 +ms.topic: include +ms.prod: windows-client +--- + +```xml + + + + + + + + + + + + + + + +``` diff --git a/windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-intune.md b/windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-intune.md new file mode 100644 index 0000000000..cf10c46e0a --- /dev/null +++ b/windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-intune.md @@ -0,0 +1,14 @@ +--- +author: paolomatarazzo +ms.author: paoloma +ms.date: 02/05/2024 +ms.topic: include +ms.prod: windows-client +--- + +```msgraph-interactive +POST https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations +Content-Type: application/json + +{ "id": "00-0000-0000-0000-000000000000", "displayName": "_MSLearn_Example", "description": "Collection of settings for Assigned Access", "roleScopeTagIds": [ "0" ], "@odata.type": "#microsoft.graph.windows10CustomConfiguration", "omaSettings": [ { "@odata.type": "#microsoft.graph.omaSettingString", "displayName": "AssignedAccess_Configuration", "description": null, "omaUri": "./Vendor/MSFT/AssignedAccess/Configuration", "secretReferenceValueId": null, "isEncrypted": true, "value": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n" } ] } +``` \ No newline at end of file diff --git a/windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-ps.md b/windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-ps.md new file mode 100644 index 0000000000..fdf12e7a24 --- /dev/null +++ b/windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-ps.md @@ -0,0 +1,94 @@ +--- +author: paolomatarazzo +ms.author: paoloma +ms.date: 02/05/2024 +ms.topic: include +ms.prod: windows-client +--- + +```powershell +$assignedAccessConfiguration = @" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"@ + +$eventLogFilterHashTable = @{ + ProviderName = "Microsoft-Windows-AssignedAccess"; + StartTime = Get-Date -Millisecond 0 +} + +$namespaceName="root\cimv2\mdm\dmmap" +$className="MDM_AssignedAccess" +$obj = Get-CimInstance -Namespace $namespaceName -ClassName $className +$obj.Configuration = [System.Net.WebUtility]::HtmlEncode($assignedAccessConfiguration) +$obj = Set-CimInstance -CimInstance $obj -ErrorVariable cimSetError -ErrorAction SilentlyContinue +if($cimSetError) { + Write-Output "An ERROR occurred. Displaying error record and attempting to retrieve error logs...`n" + Write-Error -ErrorRecord $cimSetError[0] + + $timeout = New-TimeSpan -Seconds 30 + $stopwatch = [System.Diagnostics.Stopwatch]::StartNew() + do{ + $events = Get-WinEvent -FilterHashtable $eventLogFilterHashTable -ErrorAction Ignore + } until ($events.Count -or $stopwatch.Elapsed -gt $timeout) # wait for the log to be available + + if($events.Count) { + $events | ForEach-Object { + Write-Output "$($_.TimeCreated) [$($_.LevelDisplayName.ToUpper())] $($_.Message -replace "`n|`r")" + } + } else { + Write-Warning "Timed-out attempting to retrieve event logs..." + } + + Exit 1 +} + +Write-Output "Successfully applied Assigned Access configuration" +``` \ No newline at end of file diff --git a/windows/configuration/kiosk/includes/quickstart-restricted-experience-xml.md b/windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-xml.md similarity index 100% rename from windows/configuration/kiosk/includes/quickstart-restricted-experience-xml.md rename to windows/configuration/kiosk/includes/assigned-access-quickstart-restricted-experience-xml.md