Home

powershell sqlserver module discovering role members.

%3CLINGO-SUB%20id%3D%22lingo-sub-688018%22%20slang%3D%22en-US%22%3Epowershell%20sqlserver%20module%20discovering%20role%20members.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-688018%22%20slang%3D%22en-US%22%3E%3CP%3ETrying%20to%20list%20members%20of%20a%20role%20in%20this%20case%20db_datareader%20by%20doing%3C%2FP%3E%3CP%3Edir%20SQLSERVER%3A%5CSQL%5Cserver%5Cdefault%5Cdatabases%5Coperationsmanager%5Croles%5Cdb_datareader%26nbsp%3B%3C%2FP%3E%3CP%3Eall%20it%20returns%20is%20extendproperties%2C%20ugh%20I%20know%20that%20I%20could%20run%20a%20sqlcmd%20to%20get%20the%20results%20just%20wanted%20to%20do%20it%20within%20powershell.%26nbsp%3B%20Is%20this%20possible%20with%20the%20sqlserver%20module%20for%20ps%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Tony Roth
Occasional Contributor

Trying to list members of a role in this case db_datareader by doing

dir SQLSERVER:\SQL\server\default\databases\operationsmanager\roles\db_datareader 

all it returns is extendproperties, ugh I know that I could run a sqlcmd to get the results just wanted to do it within powershell.  Is this possible with the sqlserver module for ps?

 

thanks

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
50 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
32 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
15 Replies
Dev channel update to 80.0.355.1 is live
josh_bodner in Discussions on
67 Replies