SQLServerPSModule icon indicating copy to clipboard operation
SQLServerPSModule copied to clipboard

Invoke-Sqlcmd documentation incorrectly says -InputFile parameter disallows spaces

Open Adam-S-Daniel opened this issue 1 year ago • 1 comments

The -InputFile parameter information in the Invoke-Sqlcmd documentation states "Spaces are not allowed in the file path or file name". However, Invoke-SqlCmd executes successfully when the -InputFile parameter is used with a path and a file name that both contain spaces (e.g.: Invoke-SqlCmd -InputFile 'C:\[path containing spaces]\New Text Document.sql' [...]), at least in the following environment.

Client:

  • SqlServer PowerShell module version: 22.1.1
  • PSVersion: 7.4.0
  • OS: Microsoft Windows 10.0.19045 (Windows 10)

Server:

  • Product: Azure SQL Database Managed Instance
  • Operating System: Windows Server 2019 Datacenter (10.0)
  • Version: 12.0.2000.8

Adam-S-Daniel avatar Jan 12 '24 17:01 Adam-S-Daniel

Hi @Adam-S-Daniel - thanks for bringing it to my attention. I'll look into it and possibly fix as soon as possible.

Matteo-T avatar Jan 16 '24 07:01 Matteo-T

I'll try to look into this one while I published the documentation for v22.3.0...

Matteo-T avatar Jul 04 '24 21:07 Matteo-T

I've removed that part. Thanks. I have a PR out to update the documentation... I expect to go live as soon as it is approved. Maybe Monday. The offline documetation will pick up this change in the next release (v22.3.1+)

Matteo-T avatar Jul 05 '24 06:07 Matteo-T