Hi,
i’m new to powershell DSC and actually building a lab.
I’ve got a Windows Server 2019 DSC Pull Server and a Windows Server 2019 DSC Pull Client.
I’m able to gather my configuration from my client to my server and i’m trying to deploy some msi.
I tried different apps with no success.
Here is the error i’m facing: Event 4252 Desired State Configuration
resource DSC PowerShell DSC_xPackageResource failed to execute Set-TargetResource.
The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: Access Denied
Here is my configuration
#1: Member server configuration
Configuration BasicConf {
Param (
[string[]]$ComputerName = 'Localhost'
)
Import-DscResource -ModuleName xPSDesiredStateConfiguration
#Target node
Node $ComputerName {
File TempFolder {
Ensure = 'Present'
DestinationPath = 'C:\TempFolder'
Type = 'Directory'
}
Environment CustomApp {
Ensure = 'Present'
Name = 'CustomApp'
Value = 'C:\TempFolder'
Path = $true
DependsOn = "[File]TempFolder"
}
xPackage nxlog-ce{
Name = 'NXLog-CE'
ProductId = '{B509F23E-1C14-4D12-87B0-884898435D47}'
Path = '\\dsc-pull\sources\nxlog-ce-3.0.2272.msi'
Ensure = 'Present'
}
WindowsFeature 'FileServices'{
Ensure = 'Present'
Name = 'File-Services'
}
}
}
Many thanks for your Help,
Regards,