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
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
How to reproduce
N/A
Expected behavior
N/A
Current behavior
N/A
Suggested solution
N/A
Operating system the target node is running
PowerShell version and build the target node is running
Module version used