SampleFile.pssc file in Example 5 in New-PSSessionConfigurationFile topic is not valid - by Aleksandar Nikolić

Status : 

 


1
0
Sign in
to vote
ID 774208 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 12/13/2012 3:57:54 AM
Access Restriction Public

Description

SampleFile.pssc file in Example 5 in New-PSSessionConfigurationFile topic contains a few mistakes:

# Company associated with this session configuration
CompanyName = Fabrikam Corporation'

That should be 'Fabrikam Corporation'. An opening quote is missing.

# Copyright statement for this session configuration
Copyright = '(c) 2011 Fabrikam Corporation. All rights reserved.'

That should be ‘(c) Fabrikam Corporation. All rights reserved.’ because that value is passed in the  command -Copyright "(c) Fabrikam Corporation. All rights reserved."

# Aliases defined in this session configuration
AliasDefinitions = @(
@{
    Description='Gets help.'
    Name='hlp'
    Options='AllScope'
    Definition='Get-Help'
}, 
@{ 
    Description='Updates help'
    Name='Update'
    Options='ReadOnly'
    Definition='Update-Help'
}
)

It should be 'Value' instead of 'Definition'.

# Type files (.ps1xml) that will be loaded in this session configuration
TypesToProcess = 'Types1.ps1xml', 'Types2.ps1xml'

# Format files (.ps1xml) that will be loaded in this session configuration
FormatsToProcess = 'CustomFormats.ps1xml'

# Specifies the scripts to execute after the session is configured
ScriptsToProcess = 'Get-Inputs.ps1'

Absolute paths are needed for all four files.
Sign in to post a comment.