Issue regarding Azure Remote Service. Need Assistance ASAP RRS feed

  • General discussion

  • I have already posted this on Microsoft Azure--Web Sites and Virtual Machines on Windows Server for Hosting Service Providers, but did not receive any reply.

    I'm re-posting it here.

    I'm running this App-Attach staging code which is documented here--


    #MSIX app attach staging sample
    #region variables
    $vhdSrc="<path to vhd>"
    $packageName = "<package name>"
    $parentFolder = "<package parent folder>"
    $parentFolder = "\" + $parentFolder + "\"
    $volumeGuid = "<vol guid>"
    $msixJunction = "C:\temp\AppAttach\"
    #region mountvhd
    Mount-VHD -Path $vhdSrc -NoDriveLetter -ReadOnly
    Write-Host ("Mounting of " + $vhdSrc + " was completed!") -BackgroundColor Green
    Write-Host ("Mounting of " + $vhdSrc + " has failed!") -BackgroundColor Red
    #region makelink
    $msixDest = "\\?\Volume{" + $volumeGuid + "}\"
    if (!(Test-Path $msixJunction))
    md $msixJunction
    $msixJunction = $msixJunction + $packageName
    cmd.exe /c mklink /j $msixJunction $msixDest
    #region stage
    | Out-Null
    Add-Type -AssemblyName System.Runtime.WindowsRuntime
    $asTask = ([System.WindowsRuntimeSystemExtensions].GetMethods() | Where {
    $_.ToString() -eq 'System.Threading.Tasks.Task`1[TResult]
    $asTaskAsyncOperation =
    $packageManager = [Windows.Management.Deployment.PackageManager]::new()
    $path = $msixJunction + $parentFolder + $packageName # needed if we do the pbisigned.vhd
    $path = ([System.Uri]$path).AbsoluteUri
    $asyncOperation = $packageManager.StagePackageAsync($path, $null, "StageInPlace")
    $task = $asTaskAsyncOperation.Invoke($null, @($asyncOperation))

    Everything goes well until the last #regionstage

    I also want to know what is this #regionstage script is actually trying to do.

    Where I'm getting this error

    Can anyone explain what is this issue and how do i fix.

    I'm running this on OS Version - Microsoft Windows 10 Enterprise (10.0.19041) Build - 19041

    Please let me know if i missed to post any information.


    • Changed type Bill_Stewart Wednesday, July 22, 2020 9:39 PM
    • Moved by Bill_Stewart Wednesday, July 22, 2020 9:39 PM This is not "fix/debug/rewrite my script for me" forum
    Saturday, May 16, 2020 2:32 PM

All replies