Highlighted
Enthusiast
Enthusiast

The string is missing the terminator: ".

Jump to solution

Hi,

I am getting the below error from the attached script, please help

At D:\ESXi_Info1.ps1:519 char:74

+ ... ta exported to" ($outputFile + ".xlsx") "file" -ForegroundColor Green

+                                                  ~~~~~~~~~~~~~~~~~~~~~~~~

The string is missing the terminator: ".

At D:\ESXi_Info1.ps1:293 char:24

+         if ($Hardware) {

+                        ~

Missing closing '}' in statement block or type definition.

At D:\ESXi_Info1.ps1:257 char:39

+     foreach ($esxihost in $vHostList) {

+                                       ~

Missing closing '}' in statement block or type definition.

At D:\ESXi_Info1.ps1:1 char:27

+ function Get-ESXInventory {

+                           ~

Missing closing '}' in statement block or type definition.

    + CategoryInfo          : ParserError: (:) [], ParseException

    + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

0 Kudos
1 Solution

Accepted Solutions
Highlighted
User Moderator
User Moderator

Try this attached version.

-----------------------------------------

Was it helpful? Let us know by completing this short survey here.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
Highlighted
User Moderator
User Moderator

Try this attached version.

-----------------------------------------

Was it helpful? Let us know by completing this short survey here.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
Highlighted
Enthusiast
Enthusiast

Perfect LucD, that worked Smiley Happy

0 Kudos