Windows PowerShell Home
Test-PSSessionConfigurationfile cannot identify the real problem in a session config. file
12/13/2012 4:05:27 AM
User(s) can reproduce this bug
Example 5 in the New-PSSessionConfigurationFile help topic shows a sample session configuration file. When you test that file using the Test-PSSessionConfigurationFile cmdlet you get the following output:
PS C:\temp> Test-PSSessionConfigurationFile .\SimpleFile.pssc -Verbose
VERBOSE: Error parsing configuration file C:\temp\SimpleFile.pssc with the following message: At C:\temp\SimpleFile.pssc:99 char:35
+ ScriptsToProcess = 'Get-Inputs.ps1'
The string is missing the terminator: '.
At C:\temp\SimpleFile.pssc:100 char:2
The hash literal was incomplete.
You will now scratch your head, because you can see the opening and closing single quotes.
You will get the same error even if you comment out that line. Hmm… Error must be somewhere else, and that output is not very useful.
The real error is here:
# Company associated with this session configuration
CompanyName = Fabrikam Corporation'
It should be 'Fabrikam Corporation' and Test-PSSessionConfigurationFile didn't spot that.
How often does this happen?
Have you seen this problem before in this product?
No, this is new to the most recent version
to post a comment.
Please enter a comment.
to post a workaround.
Please enter a workaround.
© 2014 Microsoft