We help IT Professionals succeed at work.

Powershell select and edit node

indydk
indydk asked
on
88 Views
Last Modified: 2019-01-15
Hey

How do I select/Edit:  <member key="1" operator="eq" /> under database "000 name" and "HR Huston" (need to change key from 1 to 2)

Using Powershell
 
<roles>
   <role id="{1234}" name="Unit12">
    <databases permission="allow">
      <database name="000 Name" inherit="true">
        <cube name="HR" inherit="true">
          <dimension name="HR Huston" inherit="true">
            <hierarchy name="HR Huston" inherit="true">
              <forcedcriteria>
                <member key="1" operator="eq" />
              </forcedcriteria>
            </hierarchy>
          </dimension>
          <dimension name="HR Boston" inherit="true">
            <hierarchy name="HR Boston" inherit="true">
              <forcedcriteria>
                <member key="2" operator="eq" />
              </forcedcriteria>
            </hierarchy>
          </dimension>
        </cube>
      </database>
  </role>
</roles>
Comment
Watch Question

ste5anSenior Developer
CERTIFIED EXPERT

Commented:
Please rephrase your question. Add the code you have so far. Cause there are too many open questions, e.g. is that XML, where does it come from (file, variable or pipeline).. etc.

But: changing a key means deleting the old row and adding a new row. Keys should be stable and optimally static. So what is you use-case here?
CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.