# See if we need to remove brackets remove square brackets. Rename files. # $RenamePath = '\\Sqlprod7b\e$\MSSQL\SCRIPTS\master\StoredProcedureTFS' get-childitem $RenamePath | ForEach-Object { Move-Item -LiteralPath $_.Fullname $_.Fullname.Replace("[","").Replace("]","") -ErrorAction Stop }
SQL SMO Scripting Options broken in versions 2012-2016
Some notes about SSMS.
Here’s where the problem lies. If you are installing SQL 2012-2016 your Scripting Options may not work.
For SQL Server 2014 SSMS is included in the SQL install and SP.
The fix:
Even though you might only be installing SQL Server 2014 because SMO Options didn’t always work between versions 2012-2016 we need to install SQL Server 2017 SSMS 17.9.1.
e.g. What was broken was the SMO Scripting Option for
$Scripter.Options.NoFileGroup = $false
which is the default but even explicitly forcing it had no effect.
Simply adding SSMS 17.9.1 allowed correct scripting from the server.
https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017
SSMS 17.9.1 is the current General Availability (GA) version of SSMS
1) download Download SQL Server Management Studio 17.9.1
2) download Download SQL Server Management Studio 17.9.1 Upgrade Package (upgrades 17.x to 17.9.1)
Version Information
Release number: 17.9.1
Build number: 14.0.17289.0
Release date: November 21, 2018