I have an array list of hostnames that I need to do two things with. The first is to take the list of server names and make them lowercase. The second thing I need to do is append a domain suffix. I've gotten the array list created and made the list lowercase, but I'm having issues appending the domain suffix. Example of what I have: HOST1 HOST2 HOST3
$Stringarray = [System.Collections.ArrayList]@(“HOST1" ,"HOST2" , "HOST3", "HOST4")
$Stringarray.tolower()
$Stringarray
I can create an arraylist and then use .tolower() to get it lowercase, but I need each of the items in the list to include a domain name as well. For Example:
host1.contoso.com
host2.contoso.com
host3.contoso.com
host4.contoso.com
etc.
I think a foreach command would work, I'm just not sure how to pass the argument.