Remotely icon indicating copy to clipboard operation
Remotely copied to clipboard

I am trying to run custom module via remotely but it not works

Open SamPosh opened this issue 8 years ago • 0 comments

I found this module very useful. Our app had tightly coupled remoting solution. But this is loosely coupled and easy to use. But i am facing a problem with custom modules. In our remote machine ,we have installed our product's module. It is a binary module. When i am trying to run the module via Remotely ,it throws exception.

I even tried to import that first then run the cmdlet, but still it throws exception.

$volumes = remotely { import-module 'C:\Program Files\Our application\bin ipmo\StorageVolume.Powershell.dll' Get-StorageVolume } $volumes.GetError()

It throws exception as below.

The term 'Get-StorageVolume' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. + CategoryInfo : ObjectNotFound: (Get-StorageVolume:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException + PSComputerName : 10.21.74.128

Can't we use custom modules which are not installed in PSModulepath?

SamPosh avatar Jan 22 '18 14:01 SamPosh