Top "Invoke-sqlcmd" questions

PowerShell cmdlet that runs a script containing statements from the languages (Transact-SQL and XQuery) and commands supported by the SQL Server sqlcmd utility.

Invoke-Sqlcmd unable to run

I have a PowerShell script that checks the CPU level of the server it is running on, and then if …

powershell cpu-usage invoke-sqlcmd
Invoke-Sqlcmd' is not recognized as the name of a cmdlet

We have recently started using Sql server 2012 SP3 and building the SQL server 2012 using the powershell script.  There is a …

invoke-sqlcmd
Unable to load adalsql.dll error when calling `Invoke-sqlcmd`

I have VS2015 with SSDT installed, along with SSMS and the SqlServer PowerShell module (which includes the invoke-sqlcmd comand), and …

sql-server invoke-sqlcmd
Invoke-sqlcmd output without "quotes" and headers

Output example: #TYPE System.Data.DataRow <--- "PersonalNr" <--- "00001005" "00001008" "00001009" "00001013" "00001019" "00001024" Requirements: I want a output without the 2 first lines …

powershell invoke-sqlcmd
SQL installed but powershell not picking up sqlps commands (like invoke-sqlcmd)

I installed ms sql server with chocolatey: choco install SQLServer2012DeveloperEditionWithSP1 -y -f -source 'http://choco.developers.tcpl.ca/chocolatey' …

sql-server powershell sqlps invoke-sqlcmd
PowerShell: invoke-sqlcmd with Get-Credential doesn't work

I've never seen a so easy script failing so royally: $SQLServer = "localhost" $cred = Get-Credential invoke-sqlcmd -ServerInstance $SQLServer -Credential $cred -Query "…

sql-server powershell invoke-sqlcmd