Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

How to view the current Powershell session security permissions

07 September,2021 by Tom Collins

Question: How to view the current Powershell session security permissions?   I'm trying to troubleshoot remote powershell commands and need to review the current powershell sessions standard persmissions.

 

Answer:  Use the Get-PSSessionConfiguration cmdlet. The definition from Microsoft docs : " The Get-PSSessionConfiguration cmdlet gets the session configurations that have been registered on the local computer"

As long as you have administration rights on the OS execute the following code on a Powershell command line

(Get-PSSessionConfiguration -Name Microsoft.PowerShell).Permission

--example output

NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed

 

Read more on Powershell and security

How to secure Powershell


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to view the current Powershell session security permissions


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer