| external help file | WindowsCompatibility-help.xml |
|---|---|
| Module Name | WindowsCompatibility |
| online version | |
| schema | 2.0.0 |
Initialize the connection to the compatibility session.
Initialize-WinSession [[-ComputerName] <String>] [-ConfigurationName <String>] [-Credential <PSCredential>]
[-PassThru] [<CommonParameters>]
Initialize the connection to the compatibility session. By default the compatibility session will be created on the localhost using the 'Microsoft.PowerShell' configuration. On subsequent calls, if a session matching the current specification is found, it will be returned rather than creating a new session. If a matching session is found, but can't be used, it will be closed and a new session will be retrieved.
This command is called by the other commands in this module so you will rarely call this command directly.
Initialize-WinSessionInitialize the default compatibility session.
Initialize-WinSession-ComputerName localhost -ConfigurationName Microsoft.PowerShellInitialize the compatibility session with a specific computer name and configuration
If you don't want to use the default compatibility session, use this parameter to specify the name of the computer on which to create the compatibility session. (Defaults to 'localhost')
Type: StringParameter Sets: (All)Aliases: CnRequired: FalsePosition: 1Default value: localhostAccept pipeline input: FalseAccept wildcard characters: FalseSpecifies the configuration to connect to when creating the compatibility session (Defaults to 'Microsoft.PowerShell')
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: $script:DefaultConfigurationNameAccept pipeline input: FalseAccept wildcard characters: FalseThe credential to use when connecting to the target machine/configuration
Type: PSCredentialParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseIf present, the specified session object will be returned
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).