Link to home
Start Free TrialLog in
Avatar of gzugg
gzuggFlag for United States of America

asked on

Can I use "Get-QADComputer -Name $computers" and pull from a csv file for the var $computers

Im looking to modify a list of Servers that are in AD.  Like to be able to use a csv or txt file to pull the name from and then have it modify them based on what I need done.  I can do this using a var for one machine and it will prompt me, but want to make sure I can do this for multible machines as well.   I am using the Quest Software "ActiveRoles Management Shell for Active Directory x64".

I have attached a txt file of what I have so far.  I think Imay need to use foreach but not sure where to put it.  I am still a NOOB working with powershell so be nice to me  :-).
decomm-ps-script.txt
Avatar of gzugg
gzugg
Flag of United States of America image

ASKER

Just adding a note, when I runt he script without the part for the csv file it works great, so I know the sytax is correct fro that part.  This will give you an option to run for one machine or use a csv file for multible machines to modify.
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial