Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Assert-ElevatedUser from SqlServerDsc to DscResource.Common Public Functions #82

Closed
hollanjs opened this issue Dec 4, 2022 · 0 comments · Fixed by #84
Closed

Add Assert-ElevatedUser from SqlServerDsc to DscResource.Common Public Functions #82

hollanjs opened this issue Dec 4, 2022 · 0 comments · Fixed by #84
Assignees
Labels
enhancement The issue is an enhancement request.

Comments

@hollanjs
Copy link
Contributor

hollanjs commented Dec 4, 2022

Problem description

The request to move Assert-ElevatedUser to the DscResource.Common module was created in the SqlServerDsc module under Issue 1797.

This function is used to assert the user is using an elevated PowerShell session, and that it could also better the entire DSC community by being included in the DscResource.Common module.

The function can be placed prior to commands that require elevated permissions, e.g.
...
Assert-ElevatedUser -ErrorAction 'Stop'
[Code that requires elevated permissions]
...

Verbose logs

N/A

How to reproduce

N/A

Expected behavior

N/A

Current behavior

N/A

Suggested solution

N/A

Operating system the target node is running

N/A

PowerShell version and build the target node is running

N/A

Module version used

0.11.1
@johlju johlju added the enhancement The issue is an enhancement request. label Dec 4, 2022
johlju pushed a commit that referenced this issue Dec 10, 2022
- Added public function `Assert-ElevatedUser` that asserts the user has elevated
  the PowerShell session. issue #82
johlju pushed a commit that referenced this issue Dec 10, 2022
- Add public function `Assert-ElevatedUser` that asserts the user has elevated
  the PowerShell session. issue #82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants