buck.woody
LinkedIn | FaceBook | Twitter
Resume
If you're using the PowerShell provider for SQL Server, you can quickly script out all of the objects in a "directory" using a simple method. Just navigate to the directory of objects you're interested in, say the "Views" of a certain database, and type this:
# Script objects in a directory
DIR * | foreach {$_.Script()}
This will only work for objects that can be scripted, of course, and requires that you have the proper permissions.
PingBack from http://blog.a-foton.ru/index.php/2009/01/08/powershell-provider-for-sql-server-script-of-the-day-script-all-objects/