Open kfsone opened 1 year ago
In my case, we already have machine and user policies, these two users have a need to specifically allow differently policies unique to their two accounts. Not sure what the point of specifying a run-as credential is, if using different credentials doesn't change who 'CurrentUser' is.
Would it be possible to make a composite resource that adds a property Credential as key property. The credential property could then maybe be added to PsDscRunAsCredential
? 🤔 If that works we would not need to make a breaking change,
(Just playing catch up after a very hectic "holiday", heh)
That's not possible because Credential just isn't part of the underlying separators, so the composite would simply cause the problem - at least, my attempts to make one seemed to bear this out.
Problem description
Powershell 5.1 DSC doesn't allow you to specify the same ExecutionPolicy for ExecutionPolicyScope 'CurrentUser' but different PsRunAsCredentials, meaning you can't assign it to multiple specific users.
Verbose logs
DSC configuration
Suggested solution
Add
PowerShellUserExecutionPolicy
which doesn't take scope and requires a credential.Operating system the target node is running
PowerShell version and build the target node is running
ComputerManagementDsc version