mkellerman / Invoke-CommandAs

Invoke Command As System/Interactive/GMSA/User on Local/Remote machine & returns PSObjects.
https://www.powershellgallery.com/packages/Invoke-CommandAs/
MIT License
457 stars 70 forks source link

PowerShell Core Compatiblility #45

Closed mkellerman closed 3 years ago

mkellerman commented 4 years ago

With the introduction of PowerShell Core, we should consider making this module compatible with Linux/Mac.

This is a open discussion, of what would be needed, and what feature we would want to implement for non-windows OSes.

Let me know what you think, and if anyone is willing to work on this.

hamannju commented 3 years ago

Is there some kind of a test suite of commands to run in order to determine whether the module works correctly? I've just started running this module on Pop OS / Ubuntu 21.04 using powershell 7.1.4 and it seems to work almost out of the box. The only thing that was not working immediately is that if I just import the module, then the commands do not get exported. However if I directly load the functions using the suggested method:

Import-Module ".\Invoke-ScheduleTask.ps1"
Import-Module ".\Invoke-CommandAs.ps1"

Then it works immediately an I am able to run commands against my windows hosts.

mkellerman commented 3 years ago

You should be importing the .psm1 file, which is the manifest that loads all the files.