That cmdlet: Unlock-AdminPowerApp does not exist in the GA (General Availability) Microsoft.PowerApps.Administration.PowerShell module. It was likely a preview-only discussion that never made it to the final build.
Can you try this Solution: Three Paths to Recovery
If your app is locked or refusing to open, follow these steps in order:
1. Verify Your Environment
Ensure you are running the correct module. Many issues stem from outdated versions.
PowerShell
# Force an update to the latest admin module
Install-Module Microsoft.PowerApps.Administration.PowerShell -Force
Import-Module Microsoft.PowerApps.Administration.PowerShell
# Verify available cmdlets
Get-Command *AdminPowerApp*
2. Force-Take Ownership (The "Soft Unlock")
Often, the "lock" is actually a metadata mismatch or a reference to a deleted user. Re-assigning ownership forces a refresh of the app's backend record.
PowerShell
Set-AdminPowerAppOwner `
-AppName <AppId> `
-EnvironmentName <EnvironmentId> `
-AppOwner <your-admin-UPN>
3. Bypass the Editor via Admin Copy
If the Studio editor is the part that's failing, you can often bypass it entirely by creating a fresh copy of the app via the API.
PowerShell
Copy-AdminPowerApp `
-SourceAppName <AppId> `
-TargetAppName "Recovered_App_Backup" `
-SourceEnvironmentName <EnvId> `
-TargetEnvironmentName <EnvId>
When to Open a Support Ticket
If Copy-AdminPowerApp fails, you are likely dealing with deep backend corruption (e.g., a truncated .msapp file in the blob storage).
Don't delete the app. Open a ticket and explicitly mention:
"Attempted Set-AdminPowerAppOwner and Copy-AdminPowerApp without success. App fails with ErrOpeningDocument_UnknownError.
Requesting backend rehydration or a roll-back to an internal snapshot."