CategoriesPowerShellSharePoint Online

Connect-SPOService-is-not-recognized

The term ‘Connect-SPOService’ is not recognized as the name of a cmdlet

If you’re trying to execute powershell script and you got this message, you need to install SPO Management Shell and import the module.

Execute this script (as Admin)

Install-Module Microsoft.Online.SharePoint.PowerShell -Force

Now, you can try to connect:

Connect-SPOService -url https://yourorganization-admin.sharepoint.com

Could not load type Microsoft.SharePoint.Administration.DesignPackageType

If you get this error (It was my problem), you can try solve it following these steps:

  1. From Windows Control Panel, uninstall “SharePoint Client Components”
  2. Execute (Admin mode) Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell -AllVersions -Force
  3. Execute (Admin mode) Install-Module Microsoft.Online.SharePoint.PowerShell -Force

I hope it help you…Have a good day!

CategoriesPower AppsPowerShell

Restore deleted App

Did you deleted your App 🙂 ?

Don’t worry, in the most of case you can recover it. Let’s see how, with simple powershell command. As I usually write, if you know what you do , the script is:

Get-AdminRecoverDeletedPowerApp -EnvironmentName ‘Default-abcd1234-abcd1234-abcd1234’  -AppName ‘abcd1234-abcd1234-abcd1234-abcd1234-abcd1234’

Step to do it:

  1. Install these PowerShell Modules (You must be admin of PC):
    • Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
    • Install-Module -Name Microsoft.PowerApps.PowerShell
  2. Find Environment Name:
    • Get-PowerAppEnvironment (You can get it also from url…)
  3. Find deleted App Name
    • Get-AdminDeletedPowerAppsList -EnvironmentName Default-abcd1234-abcd1234-abcd1234

Now, you can restore your app:

  1. Add-PowerAppsAccount (It open prompt to get credentials)
  2. Get-AdminRecoverDeletedPowerApp -EnvironmentName ‘Default-abcd1234-abcd1234-abcd1234’  -AppName ‘abcd1234-abcd1234-abcd1234-abcd1234-abcd1234’

I hope it help you…Have a good day!

CategoriesPower AppsPowerShell

Change App Owner

Let’s see how to change Power App owner.

Actually there is no possible to change it from UI. You can only add a Co-Owner user.

Fortunately we can do it with a simple PowerShell command:

Set-AdminPowerAppOwner -AppName ‘abcd1234-abcd1234-abcd1234-abcd1234-abcd1234’ -AppOwner ‘abcd1234-abcd1234-abcd1234’ -EnvironmentName ‘Default-abcd1234-abcd1234-abcd1234’

Step to do it:

  1. Install these PowerShell Modules (You must be admin of PC):
    • Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
    • Install-Module -Name Microsoft.PowerApps.PowerShell
  2. Find Environment Name:
    • Get-PowerAppEnvironment
  3. Find App Name
    • Get-PowerApp ‘Name of your PowerApp’
  4. Get UserID
    • Personally I take it from Azure AD

Now, you can change Owner:

  1. Add-PowerAppsAccount (It open prompt to get credentials)
  2. Set-AdminPowerAppOwner -AppName ‘abcd1234-abcd1234-abcd1234-abcd1234-abcd1234’ -AppOwner ‘abcd1234-abcd1234-abcd1234’ -EnvironmentName ‘Default-abcd1234-abcd1234-abcd1234’

 

I hope it help you…Have a good day!

My Agile Privacy
This website uses technical and profiling cookies. Clicking on "Accept" authorizes all profiling cookies. Clicking on "Refuse" or the "X" will refuse all profiling cookies. By clicking on "Customize" you can select which profiling cookies to activate.
Warning: some page functionalities could not work due to your privacy choices: