ÿþ<html> <head> <title>New-ReplScriptOptions</title> </head> <body> <h1>New-ReplScriptOptions</h1> <div>Creates an instance of a RMO ScriptOptions object used for scripting RMO objects.</div> <h2> Syntax </h2> <code>New-ReplScriptOptions [&lt;CommonParameters&gt;]</code> <h2> Detailed Description </h2> <div> The New-ReplScriptOptions function creates an instance of a custom RMO ScriptOptions object used for scripting RMO objects by the Get-ReplScript function. </div> <h2> Related Commands </h2> <div> * <a href='New-ReplScriptOptions.htm'>New-ReplScriptOptions</a><br/> * <a href='Get-ReplScript.htm'>Get-ReplScript</a><br/> * <a href='http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.replication.scriptoptions(SQL.90).aspx'> http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.replication.scriptoptions(SQL.90).aspx</a><br/> </div> <h2> Parameters </h2> <table border='1'> <tr> <th>Name</th> <th>Description</th> <th>Required?</th> <th>Pipeline Input</th> <th>Default Value</th> </tr> <tr valign='top'> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> <h2> Input Type </h2> <div>None You cannot pipe objects to New-ReplScriptOptions</div> <h2> Return Values </h2> <div>System.int64 New-ReplScriptOptions returns an System.int64 object.</div> <h2> Notes </h2> <div>Unlike SMO which has default script options, RMO at at a minimum requires CREATION be specified. The CREATION property is set to default to true. The RMO implementation of scripting uses an enum with flagsattribute set to combine multiple options. In order to make RMO scripting options discoverable and easier to use a custom object with all available RMO script options as properties is created. For any property set to true the function will perform a bitwise operation that can then be use by an RMO script method. There are 35 settable scripting options at the time of this writing, see link below for detailed explanation of each option.</div> <h2> Examples </h2> <h3> EXAMPLE 1</h3> <pre>$scriptOpts = New-ReplScriptOptions; $scriptOpts.Deletion = $true; Get-ReplServer "Z002\sql2K8" | Get-replscript -scriptOpts $scriptOpts</pre> <div>This command creates an RMO Scriptoptions object, sets the Deletion property to true and finally calls Get-replscript passing the script options.</div> </body> </html>