dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Export-SqlLogin - Errors in HELP Part and Website - ParameterName wrong

Open sql-aus-hh opened this issue 10 years ago • 2 comments

Hi, today I've tried to export a single SQLServerLogin by using the example from the website (similiar to HELP Part) Export-SqlLogin -SqlServer SQLServerName -Login testsqlserveruser -FileName C:\temp\login_export.sql

But that won't work on my Windows 2008R2 + SQLServer 2012 EE A little Research showed me that the Parameter is FilePath instead of FileName and on my machine i got the error that it can't resolve the parameter binding with its position....

The only way it worked for me on my machine was Export-SqlLogin -SqlServer Servername\InstanceName -Login testsqlserveruser --FileName C:\temp\login_export.sql

And it would be very nice if you could make it a little bit clearer what -SqlServer means... only the servername or only instance... ok with a little bit of thinking you can resolve it by yourself but a hint could make it a little bit easier.

Instead of: .PARAMETER SqlServer The SQL Server to export the logins from. SQL Server 2000 and above supported.

it would nicer (e.g.) .PARAMETER SqlServer Complete SQL Servername with InstanceName without quotes. SQL Server 2000 and above supported.

sql-aus-hh avatar Aug 30 '16 18:08 sql-aus-hh

Addressed in #169

dansqldba avatar Aug 31 '16 12:08 dansqldba

How lazy of me, I merged the commit which addressed this issue several days ago!

dansqldba avatar Sep 06 '16 09:09 dansqldba