Open johlju opened 6 years ago
For example when running this on a node not part of the CONTOSO domain.
Invoke-DscResource -ModuleName JustEnoughAdministration -Name JeaEndpoint -Method Set -Verbose -Property @{ EndpointName = 'Microsoft.PowerShell' RoleDefinitions = "@{ 'CONTOSO\DnsAdmins' = @{ RoleCapabilities = 'DnsAdmin' } }" TranscriptDirectory = 'C:\ProgramData\JeaEndpoint\Transcripts' ScriptsToProcess = @('C:\ProgramData\JeaEndpoint\startup.ps1') VisibleCmdlets = "'DnsServer\*', @{ 'Name' = 'Restart-Service' 'Parameters' = @{ 'Name' = 'Name' 'ValidateSet' = 'Dns' } }" }
It's reporting this error, but continue to process without failing.
'Could not grant remote access to 'CONTOSO\DnsAdmins': 'Some or all identity references could not be translated.'
I suggest adding -ErrorAction to the calls to Register-PSSessionConfiguration, and maybe also Unregister-PSSessionConfiguration.
-ErrorAction
Register-PSSessionConfiguration
Unregister-PSSessionConfiguration
For example when running this on a node not part of the CONTOSO domain.
It's reporting this error, but continue to process without failing.
I suggest adding
-ErrorAction
to the calls toRegister-PSSessionConfiguration
, and maybe alsoUnregister-PSSessionConfiguration
.