PowerShell: Get-SqlLogin

ImperatorMingImperatorMing Member Posts: 13
edited 2020-07-25 in NAV Three Tier
Hey there,
maybe someone who is more into PS can help. I want to use the Get-SqlLogin command on powershell (see: https://docs.microsoft.com/en-us/powershell/module/sqlserver/get-sqllogin?view=sqlserver-ps).
But it seems like i am missing somethin:
4a81xwenhfwa.png

I cannot find out which "Import-Module" command allows me to import the missing function. This is probably because I'm not that experienced with the powershell. Maybe someone knows?

Answers

  • kylehardinkylehardin Member Posts: 257
    Get-Module will show you the modules (think of them as PowerShell add-ons) you currently have.

    You are probably missing the SQL module.

    Install-Module SqlServer
    Kyle Hardin - ArcherPoint
  • kylehardinkylehardin Member Posts: 257
    Apologies - instead of Get-Module do Get-InstalledModule to see what you currently have.

    And this is an excellent article by Freddy Kristiansen on beefing up your PowerShell skills. It helped me a lot.

    https://freddysblog.com/2019/08/04/powershell-for-non-experts/
    Kyle Hardin - ArcherPoint
Sign In or Register to comment.