An administrator is preparing a new JEA role for service operators.
Which cmdlet should the administrator use to create the role capability file?
Why
Use New-PSRoleCapabilityFile to create the file, then edit it to expose the commands required by the role. Endpoint registration is a separate step.
- Not correct: Register-PSSessionConfiguration. Register-PSSessionConfiguration registers an endpoint using a session configuration file. The source requires the role capabilities to exist before registration.
- Not correct: Get-PSSessionConfiguration. Get-PSSessionConfiguration retrieves session configurations. The source uses it to list endpoint names, rather than create role capability files.
- Not correct: Import-PSSession. Import-PSSession imports proxy commands from an existing remote session, as described in the source. It does not perform the requested file-creation step.
- Correct: New-PSRoleCapabilityFile. The source identifies New-PSRoleCapabilityFile as the cmdlet for creating a role capability file.