Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Appreciate that, I believe you are confusing the Targetname esxiHost1 as the names of esxi hosts in the csv file, both are different. I'm acquiring the IP addresses from the csv file based on the VMK, nothing more.
Write-Host : Cannot bind parameter 'ForegroundColor'. Cannot convert value "esxi21.v.lab,192.168.2.31" to type "System.ConsoleColor".
Error: "Unable to match the identifier name esxi21.v.lab,192.168.2.31 to a valid enumerator name. Specify one of the following
enumerator names and try again:
Black, DarkBlue, DarkGreen, DarkCyan, DarkRed, DarkMagenta, DarkYellow, Gray, DarkGray, Blue, Green, Cyan, Red, Magenta, Yellow, White"
At line:3 char:41
+ Write-Host 'Host-{0} IPAddress:{1}' -f $_.Hosts, ($_.IP)
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Write-Host], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WriteHostCommand
jvierra wrote: ↑Sat Oct 12, 2019 12:25 am
If the following isn't what you are asking then I am sure I will never guess correctly unless you can figure out how to ask the correct question
You are asking questions that show you have not taken the time to learn PowerShell basics. Please note that it is not possible to learn PowerShell by asking questions in forums. You will get misleading information and never actually learn how to use PowerShell. It is necessary to take a good tutorial or purchase a book to gain the fundamentals of PowerShell.
I recommend a book as it is easier to check back to and refresh you knowledge.
As with any advanced technology you must take the time to understand the basic technology in order to use it correctly.
jvierra wrote: ↑Sat Oct 12, 2019 9:19 am
You are asking questions that show you have not taken the time to learn PowerShell basics. Please note that it is not possible to learn PowerShell by asking questions in forums. You will get misleading information and never actually learn how to use PowerShell. It is necessary to take a good tutorial or purchase a book to gain the fundamentals of PowerShell.
I recommend a book as it is easier to check back to and refresh you knowledge.
As with any advanced technology you must take the time to understand the basic technology in order to use it correctly.
Thanks, yes I did go through the basics, however, not completely.
"PowerShell in Action Third Edition" by members of the PowerShell development team. Available for all major booksellers and from the publisher -Manning Publications.
This topic is 4 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.