Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Problems with ShellLauncherBridgeWmiHelpers.ps1 #489

@forderud

Description

@forderud

I'm experiencing problems configuring Shell Launcher V2 custom shell using the ShellLauncherBridgeWmiHelpers.ps1 script as documented on https://github.com/microsoft/Windows-iotcore-samples/tree/develop/Samples/ShellLauncherV2/SampleBridgeWmiScripts

Here's the error I'm observing in PowerShell (running as admin):

PS C:\Staging> . .\ShellLauncherBridgeWmiHelpers.ps1
PS C:\Staging> Set-ShellLauncherBridgeWmi -FilePath .\CustomShell.xml
The property 'ShellLauncher' cannot be found on this object. Verify that the property exists and can be set.
At C:\Staging\ShellLauncherBridgeWmiHelpers.ps1:16 char:5
+     $AssignedAccessCsp.ShellLauncher = $EscapedXml
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

Set-CimInstance : Cannot bind argument to parameter 'InputObject' because it is null.
At C:\Staging\ShellLauncherBridgeWmiHelpers.ps1:17 char:34
+     Set-CimInstance -CimInstance $AssignedAccessCsp
+                                  ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-CimInstance], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Management.Infrastructure.CimCm
   dlets.SetCimInstanceCommand

It seems like the problem is caused by Get-CimInstance -Namespace "root\cimv2\mdm\dmmap" -ClassName "MDM_AssignedAccess" is returning an empty object.

Tested system: Windows 10 IoT Enterprise LTSC 2021 21H2 (x64 edition) with Client-EmbeddedShellLauncher and Client-EmbeddedLogon enabled using DISM.
image

This problems is also reported on microsoft/Windows-IoT-Samples#84

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions