![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Bit Operators Hi, I am currently trying to do some AD modifications to the UserAccountControl attribute using powershell but there does not appear to be many bitwise operators in Powershell, specifically XOR. From the Monad Language Quick Reference guide which I think came with Beta 1 it appears that there used to be a -bnot operator which has been removed. Are there any plans to add more operators or is backing off to cmd.exe the best bet? Cheers Dave |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Bit Operators -bnot was not removed, and we will have -bxor and -xor in our next release. PS C:\monad> -bnot 1 -2 PS C:\monad> 1 -bxor 1 0 -- Wei Wu [MSFT] Windows PowerShell Team Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Wrighty" <dave.net@wrighty.net> wrote in message news:eRfX6hDnGHA.1248@TK2MSFTNGP05.phx.gbl... > Hi, > > I am currently trying to do some AD modifications to the > UserAccountControl attribute using powershell but there does not appear to > be many bitwise operators in Powershell, specifically XOR. > > From the Monad Language Quick Reference guide which I think came with Beta > 1 it appears that there used to be a -bnot operator which has been > removed. > > Are there any plans to add more operators or is backing off to cmd.exe the > best bet? > > Cheers > Dave > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Bit Operators Hi Wei Wu, In that case there seems to be a doc bug in the Bitwise operators section of about_operator.help.txt where -bnot is not mentioned. Andrew Watt MVP On Fri, 30 Jun 2006 07:28:19 -0700, "Wei Wu [MSFT]" <wwu@microsoft.com> wrote: >-bnot was not removed, and we will have -bxor and -xor in our next release. >PS C:\monad> -bnot 1 >-2 >PS C:\monad> 1 -bxor 1 >0 |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Bit Operators Wei Wu, Thanks for this, must have been going mad when I was looking earlier. Great news that XOR is being added to the next release, PowerShell is becoming a fantastic tool for all our day to day management. Cheers Dave "Wei Wu [MSFT]" <wwu@microsoft.com> wrote in message news:OyvKwFFnGHA.5056@TK2MSFTNGP04.phx.gbl... > -bnot was not removed, and we will have -bxor and -xor in our next > release. > PS C:\monad> -bnot 1 > -2 > PS C:\monad> 1 -bxor 1 > 0 > > -- > Wei Wu [MSFT] > Windows PowerShell Team > Microsoft Corporation > This posting is provided "AS IS" with no warranties, and confers no > rights. > > "Wrighty" <dave.net@wrighty.net> wrote in message > news:eRfX6hDnGHA.1248@TK2MSFTNGP05.phx.gbl... >> Hi, >> >> I am currently trying to do some AD modifications to the >> UserAccountControl attribute using powershell but there does not appear >> to be many bitwise operators in Powershell, specifically XOR. >> >> From the Monad Language Quick Reference guide which I think came with >> Beta 1 it appears that there used to be a -bnot operator which has been >> removed. >> >> Are there any plans to add more operators or is backing off to cmd.exe >> the best bet? >> >> Cheers >> Dave >> > > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Bit Operators Hi Andrew, Please open a doc bug. Thanks. -- Wei Wu [MSFT] Windows PowerShell Team Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message news:ghdaa2tvoofnveovo5d0qvre1cj95amshs@4ax.com... > Hi Wei Wu, > > In that case there seems to be a doc bug in the Bitwise operators > section of about_operator.help.txt where -bnot is not mentioned. > > Andrew Watt MVP > > On Fri, 30 Jun 2006 07:28:19 -0700, "Wei Wu [MSFT]" > <wwu@microsoft.com> wrote: > >>-bnot was not removed, and we will have -bxor and -xor in our next >>release. >>PS C:\monad> -bnot 1 >>-2 >>PS C:\monad> 1 -bxor 1 >>0 |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Bit Operators > Great news that XOR is being added to the next release, PowerShell is > becoming a fantastic tool for all our day to day management. BTW - what do you use XOR for? -- Jeffrey Snover [MSFT] Windows PowerShell Architect Microsoft Corporation This posting is provided "AS IS" with no warranties, no confers rights. |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Bit Operators Done. http://www.connect.microsoft.com/fee...2598&SiteID=99 Andrew Watt MVP On Fri, 30 Jun 2006 07:37:25 -0700, "Wei Wu [MSFT]" <wwu@microsoft.com> wrote: >Hi Andrew, >Please open a doc bug. Thanks. |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Bit Operators Jeffrey, In this case I was trying to flip a bit in the AD useraccountcontrol attribute. I was glad to hear from Wei Wu that BXOR is being added back as I am tempted to utilise Powershell as the basis of our provisioning system for AD objects and being able to modify these bits is a requirement. Cheers Dave "Jeffrey Snover [MSFT]" <jsnover@microsoft.com> wrote in message news:ec0gj1FnGHA.4376@TK2MSFTNGP03.phx.gbl... >> Great news that XOR is being added to the next release, PowerShell is >> becoming a fantastic tool for all our day to day management. > BTW - what do you use XOR for? > > -- > Jeffrey Snover [MSFT] > Windows PowerShell Architect > Microsoft Corporation > This posting is provided "AS IS" with no warranties, no confers rights. > |
My System Specs![]() |
| | #9 (permalink) |
| | Re: Bit Operators you can also use InvokeSet for setting bits of the useraccountControl $User.invokeSet('Accountdisabled',$false) = $user.userAccountControl = $user.userAccountControl[0] -band (-bnot 2) for more info I just posted a blogentry about setting AD Poperties : with more explaining http://mow001.blogspot.com/2006/07/p...ry-part-3.html gr /\/\o\/\/ Wrighty wrote: > Jeffrey, > > In this case I was trying to flip a bit in the AD useraccountcontrol > attribute. > > I was glad to hear from Wei Wu that BXOR is being added back as I am tempted > to utilise Powershell as the basis of our provisioning system for AD objects > and being able to modify these bits is a requirement. > > Cheers > Dave > > > > "Jeffrey Snover [MSFT]" <jsnover@microsoft.com> wrote in message > news:ec0gj1FnGHA.4376@TK2MSFTNGP03.phx.gbl... >>> Great news that XOR is being added to the next release, PowerShell is >>> becoming a fantastic tool for all our day to day management. >> BTW - what do you use XOR for? >> >> -- >> Jeffrey Snover [MSFT] >> Windows PowerShell Architect >> Microsoft Corporation >> This posting is provided "AS IS" with no warranties, no confers rights. >> > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| redirection operators as syntactic suger | PowerShell | |||
| Powershell Operators | PowerShell | |||
| CTP2 comparison operators | PowerShell | |||
| Subexpressions and Unary Operators | PowerShell | |||
| Any possibility for boolean operators in message rules? | Vista mail | |||