PowerShell for the Power Platform-Modules-available

Have you tried installing PowerShell for the Power Platform yet? One of the annoying things is that you need to have admin rights.

Earlier this week I saw someone mention an option to avoid the Install-Module on LinkedIn. By doing so the need fro Admin rights was also avoided. I would have liked to include a link to that post but I can’t find it.

Install PowerShell for the Power Platform

Using the Save-Module option you can download a module the same way as install module does. without the need for local admin rights.

In the installation documentation the following lines of code are given:

Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber

Without Admin rights

Rather than using the above lines I’m using the following lines:

if ($env:PSModulePath -notlike "*c:\Projects\Modules*")
{
   if((Get-Item c:\projects\Modules -ErrorAction SilentlyContinue ) -eq $null) {
   New-Item -Path c:\projects -Name "Modules" -ItemType "directory"
}
$env:PSModulePath += ";c:\Projects\Modules"
}
Save-Module -Name Microsoft.PowerApps.Administration.PowerShell -Path c:\Projects\Modules
Import-Module -Name Microsoft.PowerApps.Administration.PowerShell
Save-Module -Name Microsoft.PowerApps.PowerShell -Path c:\Projects\Modules
Import-Module -Name Microsoft.PowerApps.PowerShell

Ok, that is a lot of lines to replace just 2 lines.

PowerShell for the Power Platform available
Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

4 thoughts on “Install PowerShell for the Power Platform without admin rights”
  1. Save-Module failed – PackageManagement\Save-Package : No match was found for the specified search criteria and module name ‘Microsoft.PowerApps.Administration.PowerShell’. Try Get-PSRepository to see all
    available registered module repositories.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1598 char:21
    + $null = PackageManagement\Save-Package @PSBoundParameters
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Microsoft.Power…ets.SavePackage:SavePackage) [Save-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

    1. HI Nigel,

      That looks like either your $env:PSModulePath didn’t get set correctly or the Save-Module didn’t put the download into the Modules location existing in $env:PSModulePath

      Thanks,
      Pieter

  2. There is an even simpler approach. Just use -Scope CurrentUser switch:

    Install-Module Microsoft.PowerApps.Administration.PowerShell -Scope CurrentUser

Leave a Reply to nigelpwordpressCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue reading