Hello
Thanks to your help we were able to execute the script, I explain:
1.- We run the script locally
Invoke-DscResource -Name cApplication -ModuleName DSCR_Application -Method set -Property @{
Name="Mozilla Firefox (x64 es-ES)";
InstallerPath="C:\Tmp\firefox.exe";
Arguments="-ms -ma"
}
works properly !!!
2.- We run the script remotelly
$cred = Get-Credential
enter-pssession -ComputerName PC670 -credential $cred
Invoke-DscResource -Name cApplication -ModuleName DSCR_Application -Method set -Property @{
Name="Mozilla Firefox (x64 es-ES)";
InstallerPath="C:\Tmp\firefox.exe";
Arguments="-ms -ma"
}
works properly !!!
3.- We run the script remotelly
Invoke-Command -ComputerName PC670 -ScriptBlock {
Invoke-DscResource -Name cApplication -ModuleName DSCR_Application -Method set -Property @{
Name="Mozilla Firefox (x64 es-ES)";
InstallerPath="C:\Tmp\firefox.exe";
Arguments="-ms -ma"
}
}
It has the same behavior as when running in otter, that is, the firefox is installed but in the end it generates the error "Serialized XML is nested too deeply"
We have tried different things to fix this error but it always returns the same error
- We have executed with powershell 7
- We have configured wsman to allow delegating credentials
- We have tried to run the script on a PC that is not in our domain
we continue to search, but you do not think it could be a Powershell error that Microsoft has not yet solved?
Thanks