Send-File

SYNOPSIS

Sends a file to a remote session.

SYNTAX

Send-File [-SourceFilePath] <String> [-DestinationFolderPath] <String> [-Session] <PSSession[]> [-Force]
 [<CommonParameters>]

DESCRIPTION

Sends a file to a remote session.

EXAMPLES

EXAMPLE 1

$session = New-PsSession leeholmes1c23
Send-File c:\temp\test.exe c:\temp\test.exe $session

Sends the file test.exe to a remote session

PARAMETERS

-SourceFilePath

The local source path

Type: String
Parameter Sets: (All)
Aliases:

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

-DestinationFolderPath

The remote destination path

Type: String
Parameter Sets: (All)
Aliases:

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

-Session

The session to send to

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

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

-Force

Indicates that existing files will be overwritten

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
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

NOTES