I currently am working with a script that utilizes the SQLPS module. This is due to the current version of my PowerShell, 4.0. I have a script that works on a coworkers machine, but not mine, that utilizes the SqlServer module, specifically the cmdlets Get-SqlServer
and Get-SqlDatabase
.
While I have seen that there is a Get-SqlDatabase
cmdlet in the SQLPS module, I am unsure of what command will accomplish the same for me as the SqlServer command Get-SqlServer
.
Does anyone know how I could convert the code to work with SQLPS?
@{ login = $_ ; server = Get-SqlServer $_.name $_.user $_.pass }
Hopefully that is enough information.