Send-ModuleToPSSession

SYNOPSIS

Send an entire module to a remote session

SYNTAX

Send-ModuleToPSSession [-Module] <PSModuleInfo> [-Session] <PSSession[]> [-Scope <String>]
 [-IncludeDependencies] [-Move] [-Encrypt] [-NoWriteBuffer] [-Verify] [-NoClobber] [-MaxBufferSize <UInt32>]
 [<CommonParameters>]

DESCRIPTION

Send an entire module to a remote session, including any dependencies and with the ability to encrypt or move. The module needs to be defined by a manifest.

EXAMPLES

Example 1

PS C:\> Send-ModuleToPSSession -Module (Get-Module -List AutomatedLab.Common)[0] -Session (New-PSSession -ComputerName Host1,Host2,Host3) -IncludeDependencies

Copies the module AutomatedLab.Common to three PowerShell Sessions

PARAMETERS

-Module

The module to send

Type: PSModuleInfo
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Session

The sessions to send the module to

Type: PSSession[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope

The scope, i.e. CurrentUser or allUsers

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeDependencies

Indicates that module dependencies should be copied as well

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Move

INdicates that the module should be moved instead of copied

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encrypt

Indicates that EFS should be used

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoWriteBuffer

@{Text=}

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Verify

@{Text=}

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoClobber

@{Text=}

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxBufferSize

@{Text=}

Type: UInt32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept 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.

INPUTS

OUTPUTS

System.IO.FileInfo

NOTES