Eternal IF/ElseIF script

Welcome Forums General PowerShell Q&A Eternal IF/ElseIF script

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years, 4 months ago.

  • Author
  • #5461

    Topics: 1562
    Replies: 0
    Points: 0
    Rank: Member

    by johnkeng at 2013-01-22 10:09:41

    Hello All,

    I'm curious if there is a better way to sort AD objects in powershell than IF/ElseIF. I'm looking to sort all our computers into department OU's based on the computer name and OU name. Currently, I'm getting all computer objects based on OS version and system name and moving them to a specific ou, but we have over 180 computer OU's and the IF/ELSEIF goes on forever. Is there a simpler and neater (aesthetically and functionally) way of performing this task?


    by kittH at 2013-01-22 11:09:29

    You could try using "Switch" ... 30937.aspx

The topic ‘Eternal IF/ElseIF script’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort