Install PowerShell for the Power Platform without admin rights

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
Install PowerShell for the Power Platform without admin rights 1

Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/ Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/ You can contact me using contact@sharepains.com

Related Posts

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

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

Discover more from SharePains

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

Continue reading