Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Latest commit

History

History
183 lines (132 loc) · 3.69 KB

File metadata and controls

183 lines (132 loc) · 3.69 KB
external help fileWindowsCompatibility-help.xml
Module NameWindowsCompatibility
online version
schema2.0.0

Copy-WinModule

SYNOPSIS

Copy modules from the compatibility session that are directly usable in PowerShell Core.

SYNTAX

Copy-WinModule [[-Name] <String[]>] [-ComputerName <String>] [-ConfigurationName <String>]
[-Credential <PSCredential>] [-Destination <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Copy modules from the compatibility session that are directly usable in PowerShell Core. By default, these modules will be copied to $Home/Documents/PowerShell/Modules. This can be overridden using the -Destination parameter. Once these modules have been copied, they will be available just like the other native modules for PowerShell Core.

Note that if there already is a module in the destination corresponding to the module to be copied's name, it will not be copied.

EXAMPLES

EXAMPLE 1

Copy-WinModule hyper-v -WhatIf -Verbose

Run the copy command with -WhatIf to see what would be copied to $PSHome/Modules. Also show Verbose information.

EXAMPLE 2

Copy-WinModule hyper-v -Destination ~/Documents/PowerShell/Modules

Copy the specified module to your user module directory.

PARAMETERS

-ComputerName

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: NamedDefault value: localhostAccept pipeline input: FalseAccept wildcard characters: False

-ConfigurationName

Specifies the configuration to connect to when creating the compatibility session (Defaults to 'Microsoft.PowerShell')

Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: Microsoft.PowerShellAccept pipeline input: FalseAccept wildcard characters: False

-Credential

If needed, use this parameter to specify credentials for the compatibility session

Type: PSCredentialParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False

-Destination

The location where compatible modules should be copied to

Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False

-Name

Specifies names or name patterns of modules that will be copied. Wildcard characters are permitted.

Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 1Default value: *Accept pipeline input: FalseAccept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameterParameter Sets: (All)Aliases: cfRequired: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameterParameter Sets: (All)Aliases: wiRequired: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False

CommonParameters

This 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).

INPUTS

OUTPUTS

System.Void

NOTES

RELATED LINKS