Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
The Scripter object allows programmatic access to scripting settings and is responsible for the following scripting functionality:
Output script to memory and file.
Calling the instance objects to be scripted.
Managing context of a script operation, such as checking whether an object has already been scripted.
This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.
To get Scripter object properties, users can be a member of the public fixed server role.
To set Scripter object properties, users can be a member of the public fixed server role.
To run a script operation, users require permissions for the objects that are being scripted.