< Back

Export-MgaMailAttachment

Sat Jan 18, 2020 4:40 pm

NAME Export-MgaMailAttachment



SYNOPSIS

Export a mail attachment to a file





SYNTAX

Export-MgaMailAttachment [-Attachment] <AttachmentParameter[]> [[-Path] <String>] [-PassThru] [-WhatIf] [-Confirm]

[<CommonParameters>]





DESCRIPTION

Export/saves a mail attachment to a file





PARAMETERS

-Attachment <AttachmentParameter[]>

The attachment object to export



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Path <String>

The directory where to export the attachment



Required? false

Position? 2

Default value (Get-Location).Path

Accept pipeline input? false

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Outputs the token to the console



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

If this switch is enabled, no actions are performed but informational messages will be displayed that explain

what would happen if the command were to run.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

If this switch is enabled, you will be prompted for confirmation before executing any operations that change

state.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Export-MgaMailAttachment -Attachment $attachment -Path "$HOME"



Export the attement to the users profile base directory











RELATED LINKS