Link to home
Start Free TrialLog in
Avatar of Dan Henery
Dan HeneryFlag for United States of America

asked on

Need help with Powershel and racadm variables

I have two input text files one for iDRAC IP  addresses and one for the DNS Names I want to assign to each iDRAC interface.

I set variables for $iDRACIPs to get content of one file and $iDRACNames for the other file.

I am trying to figure out how to use ForEach for the two variables like $iDRACIP in $iDRACIPs and $iDRACName in $iDARCNames to run the following racadm command:


Write-Host Set DNS Name for iDRAC

racadm -r $iDRACIP -u User1-p password1 set iDRAC.NIC.DNSRacName $iDRACName


ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

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