0

I'm trying to change the permissions in a windows docker container to give admin access in the dockerfile so it can run some powershell scripts. In order to do this I'm using some commands found in the microsoft.powershell.localaccounts core module and I've found those commands to work in a base image that has that module installed in its version of powershell but sadly the base image I'm currently using doesn't have it and I need to use this version for size reasons.

I've tried running this line in the windows docker container via powershell but while it seems to run properly with no issues printing out it still isn't installed.

Find-Module -Name microsoft.powershell.localaccounts | Install-Module -SkipPublisherCheck
  • It may not solve your problem, but if you know the exact name of the module already, simply use `Install-Module microsoft.powershell.localaccounts -SkipPublisherCheck` – mklement0 Aug 26 '21 at 23:30
  • 1
    It doesn't. I think the problem might be related to -SkipPublisherCheck or permissions as I need -SkipPublisherCheck to run it at all. – Partyslug Aug 30 '21 at 14:21

0 Answers0