Here's the result:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements!
Migrating from Windows PowerShell 5.1 to PowerShell 7 - PowerShell
PS C:\WINDOWS\system32> Get-AppxPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Cannot run a document in the middle of a pipeline: C:\WINDOWS\system32\Get-AppxPackage.
At line:1 char:1
+ Get-AppxPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopm ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (C:\WINDOWS\system32\Get-AppxPackage:String) [], RuntimeException
+ FullyQualifiedErrorId : CantActivateDocumentInPipeline
PS C:\WINDOWS\system32>