Implement a RoleCapabilities DSC resource
To be able to deploy role capabilities, a DSC resource has to be created.
This resource would take same parameters as New-PSRoleCapabilityFile
- Path: where to store the file. String
- AliasDefinitions: Adds the specified aliases to sessions that use the role capability file. Hashtable with keys Name, Value, Description and Options.
- AssembliesToLoad: Specifies the assemblies to load into the sessions that use the role capability file. String list.
- EnvironmentVariable: Specifies the environment variables for sessions that expose this role capability file. Hashtable of environment variables.
- FormatsToProcess: Specifies the formatting files (.ps1xml) that run in sessions that use the role capability file. The value of this parameter must be a full or absolute path of the formatting files. String list.
- FunctionDefinitions: Adds the specified functions to sessions that expose the role capability. Hashtable with keys Name, Scriptblock and Options.
- ModulesToImport: Specifies the modules that are automatically imported into sessions that use the role capability file. By default, all of the commands in listed modules are visible. When used with VisibleCmdlets or VisibleFunctions , the commands visible from the specified modules can be restricted. Hashtable with keys ModuleName, ModuleVersion and GUID.
- ScriptsToProcess: Specifies scripts to add to sessions that use the role capability file. String list.
- TypesToProcess: Specifies type files (.ps1xml) to add to sessions that use the role capability file. The value of this parameter must be a full or absolute path of the type file names. String list.
- VariableDefinitions: Specifies variables to add to sessions that use the role capability file. Hashtable with keys Name, Value, Options.
- VisibleAliase: Limits the aliases in the session to those aliases specified in the value of this parameter, plus any aliases that you define in the AliasDefinition parameter. Wildcard characters are supported. By default, all aliases that are defined by the Windows PowerShell engine and all aliases that modules export are visible in the session. String list.
- VisibleCmdlets: Limits the cmdlets in the session to those specified in the value of this parameter. Wildcard characters and Module Qualified Names are supported. String list ?
- VisibleExternalCommands: Limits the external binaries, scripts and commands that can be executed in the session to those specified in the value of this parameter. Wildcard characters are supported. String list.
- VisibleFunctions: Limits the functions in the session to those specified in the value of this parameter, plus any functions that you define in the FunctionDefinitions parameter. Wildcard characters are supported. String list?
- VisibleProviders: Limits the Windows PowerShell providers in the session to those specified in the value of this parameter. Wildcard characters are supported. String list.
These parameters exist in New-PSRoleCapabilityFile but, in my opinion, should not be visible in the DSC resource:
- Author
- CompanyName
- Copyright
- Description
- Guid
@jnury did you make much progress on this?
This would be awesome.
I have to admit that I lost faith in this resource initiative due to its long inactivity and stopped further development... But, as it seems that there is some interest, I can start again ;-)
I've got most of the work done on my fork and just need further testing of it. I'll try to get that done in the next week or two and get it PR'd.
Till then it'll be in the gallery anyway under the JeaDsc module.
From: Julien Nury [email protected] Sent: Tuesday, October 16, 2018 7:44:10 PM To: PowerShell/JEA Cc: Chris Gardner; Comment Subject: Re: [PowerShell/JEA] Implement a RoleCapabilities DSC resource (#41)
I have to admit that I lost faith in this resource initiative due to its long inactivity and stopped further development... But, as it seems that there is some interest, I can start again ;-)
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/PowerShell/JEA/issues/41#issuecomment-430330920, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQDqFiR_mmpO6DeufWigDfgeY3o4URVIks5ulhrqgaJpZM4STRx7.
@ChrisLGardner : very nice work ! I'll contribute directly to your repo ;-)