| Author |
Message |
dbaduck
Joined: 10 Oct 2012 Posts: 1
|
Posted: Wed Oct 10, 2012 6:05 am Post subject: Working with Options and PowerShell |
|
|
When I use the Options.Default things work OK, but I want to add an option IgnoreConstraintNames, but in PowerShell you can specify one or the other, but I need to know how you would do this when executing the CompareWith and want to combine multiple options.
You cannot do [RedGate.SqlCompare.Engine.Options]::Default + [RedGate.SqlCompare.Engine.Options]::IgnoreConstraintNames
because it gives you an error that there is no op_Add for this type of object.
Thanks. |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Thu Oct 11, 2012 11:19 am Post subject: |
|
|
I haven't done much powershell myself, but what you need to do is a "bitwise or" operation to append an option to the default options. Powershell defines an operator for this called -bor, so hopefully this works:
| Quote: |
| ([RedGate.SqlCompare.Engine.Options]::Default -bor [RedGate.SqlCompare.Engine.Options]::IgnoreConstraintNames) |
_________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group