Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Implement a RoleCapabilities DSC resource #41

Open
jnury opened this issue Feb 26, 2018 · 5 comments
Open

Implement a RoleCapabilities DSC resource #41

jnury opened this issue Feb 26, 2018 · 5 comments

Comments

@jnury
Copy link
Contributor

jnury commented Feb 26, 2018

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
@ChrisLGardner
Copy link

@jnury did you make much progress on this?

@michaeltlombardi
Copy link

This would be awesome.

@jnury
Copy link
Contributor Author

jnury commented Oct 16, 2018

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 ;-)

@ChrisLGardner
Copy link

ChrisLGardner commented Oct 16, 2018 via email

@jnury
Copy link
Contributor Author

jnury commented Oct 16, 2018

@ChrisLGardner : very nice work ! I'll contribute directly to your repo ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants