I have used the ‘File’ resource to push a package which contains a java based agent application installed by running a ‘InstallService.cmd’ file. I am successful in pushing the package.
Next, I am using the ‘Package’ resource to try to execute this .cmd file on the remote server. I do a Start-DscConfiguration and I get the following error ::
Importing module MSFT_PackageResource failed with error - File
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DscResources\MSFT_PackageResource\MSFT_PackageResource.psm1 cannot be loaded. The file
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DscResources\MSFT_PackageResource\MSFT_PackageResource.psm1 is not digitally signed. You cannot run this
script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : InvalidOperation: (root/Microsoft/…gurationManager:String) , CimException
+ FullyQualifiedErrorId : ImportModuleFailed
+ PSComputerName : my-remote-server
I assume I need to elevate on the remote server somehow? Anyone run into this before? Thanks for your help!