Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Help with error: Unexpected token in expression or statement

$
0
0

Hi,

For days the following line in my code worked, with all variables containing valid data.  Im just concatenting variables:

$strADMTIncludeFile1 = $strADMTIncludeFile$strDateTime$strTxtFileXtension

Now I get the following error.  Any ideas as to why?

Unexpected token 'strDateTime' in expression or statement.
At C:\MigrateSIDHistory.ps1:74 char:55
+ $strADMTIncludeFile1 = $strADMTIncludeFile$strDateTime <<<< $strTxtFileXtension
    + CategoryInfo          : ParserError: (strDateTime:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

Thanks in advance.


MTV99

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>