Home Dashboard Directory Help
Search

Test-PSSessionConfigurationfile cannot identify the real problem in a session config. file by Aleksandar Nikolić


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 774210
Opened: 12/13/2012 4:05:27 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

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.
Details
Sign in to post a comment.
Sign in to post a workaround.