I am developing an automation system that will grant access to SQL Server databases through Powershell by running a query. I am able to do this just fine, but my question is, do I need to install SQL Server Management Studio in order to import the modules
For example:
import-module sqlserver
When I attempted this before I installed studio I was unable to install because Powershell could not find the module.
Once I had the module imported, I was able to run the follow command:
Invoke-sqlcmd -query "grant select, insert, update on test to sqlsupport;" -serverinstance "test\test"
Is there a way to have the modules available without studio?