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

Status : 


Sign in
to vote
ID 774210 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 12/13/2012 4:05:27 AM
Access Restriction Public


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