Basic Login management functionality is missing from SQLPS - by Chrissy LeMaire

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


37
0
Sign in
to vote
ID 2588952 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 4/14/2016 7:10:15 AM
Access Restriction Public

Description

Basic management is missing from SQLPS, including Database management, Login management and Job Server management (to name a few). This item addresses the need to perform SQL Server login management using PowerShell.

Community examples to pull ideas from:
Add-SqlLogin (New-SqlLogin)
Get-SqlLogin
Remove-SqlLogin
Copy-SqlLogin

There should be a way to modify login properties such as enable/disable, roles, etc.
Set-SqlLogin

With regards to Copy-SqlLogin which exists within the dbatools module, when setting up a new SQL Server it would be incredibly useful to be able to import all of the logins from another SQL Server that already exists (similar to sp_help_revlogin2).  This should work for both SQL Server logins as well as Domain logins & groups.
Sign in to post a comment.
Posted by Microsoft on 1/20/2017 at 7:34 PM
We do have some "basic" stuff now. Not everything you asked, but some:

PS C:\Users\matteot> get-command *login* -module sqlserver | select -Property CommandType,Name

CommandType Name
----------- ----
     Cmdlet Add-SqlLogin
     Cmdlet Get-SqlLogin
     Cmdlet Remove-SqlLogin

I'm resolving this one for now. I do have the missing ones on my backlog.

Thanks,
-Matteo
Posted by Microsoft on 6/29/2016 at 8:20 PM
Thanks Chrissy for the reminder. :)

I eventually found this connect bug. I'll look into it and see what I can do.

Thanks,
-Matteo