Skip to content

Commit 38082f7

Browse files
committed
Update Get-SqlDscServerPermission documentation for clarity on SQL Server logins and roles
1 parent fb7f0ce commit 38082f7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

source/Public/Get-SqlDscServerPermission.ps1

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<#
22
.SYNOPSIS
3-
Returns the current permissions for the principal.
3+
Returns the current permissions for a SQL Server login or server role.
44
55
.DESCRIPTION
6-
Returns the current permissions for the principal.
6+
Returns the current permissions for a SQL Server login or server role.
7+
The command can retrieve permissions for both user-defined and built-in
8+
server principals including SQL Server logins and server roles.
79
810
.PARAMETER ServerObject
911
Specifies current server connection object.
1012
1113
.PARAMETER Name
12-
Specifies the name of the principal for which the permissions are
13-
returned.
14+
Specifies the name of the SQL Server login or server role for which
15+
the permissions are returned.
1416
1517
.OUTPUTS
1618
[Microsoft.SqlServer.Management.Smo.ServerPermissionInfo[]]
@@ -21,6 +23,12 @@
2123
2224
Get the permissions for the principal 'MyPrincipal'.
2325
26+
.EXAMPLE
27+
$serverInstance = Connect-SqlDscDatabaseEngine
28+
Get-SqlDscServerPermission -ServerObject $serverInstance -Name 'sysadmin'
29+
30+
Get the permissions for the server role 'sysadmin'.
31+
2432
.NOTES
2533
If specifying `-ErrorAction 'SilentlyContinue'` then the command will silently
2634
ignore if the principal (parameter **Name**) is not present. In such case the

0 commit comments

Comments
 (0)