Automate File Transfers Like an Expert with PowerShell & Google Cloud

Updated: August 2026

Note: The method below relies on PowerShell scripts and components that may have changed or been deprecated since this article was first published. While the information may still be useful for legacy environments or specific use cases, we recommend using the native Google Cloud Storage Host wherever possible. To configure a Google Cloud Storage connection, navigate to Hosts in MOVEit Automation.

Hosts in MOVEit Automation

Enter required Google Cloud Storage details and authentication credentials, test the connection and save the host. The connection can then be used directly within your MOVEit Automation tasks.

Google Cloud Storage details

If you still need to use the PowerShell method, whether for a legacy deployment or a specific requirement, the original steps are detailed below.
 

Today, if you are not embracing the cloud then it would seem you are in a steadily declining minority. Cloud is the buzz term that refuses to die; and so instead we find ourselves in an age of migration toward the cloud or in a state of hybrid network, where the boundaries between cloud and hosted services are blurred.

But I know what you are thinking.

Cloud migration can be a tough world, full of APIs, resource IDs and tenants, where even the simplest of tasks, such as moving a number of files to a cloud storage location is made complicated.

Nobody wants to spend their day dragging and dropping content from one location to another...

...and you don't have to either!

With a little PowerShell scripting, you can be moving files from network to cloud without any hands, that's an automation promise.

 

PowerShell and Google Drive

 

Take a look at this script we have put together which takes a file from MOVEit Automation, an automated file transfer which we highly recommend, and moves it to a designated Google Cloud Drive.

# Change this to the file you want to upload
$sourceFile = $miaclient.MICacheFilename()

# Get the source file contents and details, encode in base64
$sourceItem = Get-Item $sourceFile
$sourceBase64 = [Convert]::ToBase64String([IO.File]::ReadAllBytes($miaclient.MIGetOriginalFilename()))
$sourceMime = [System.Web.MimeMapping]::GetMimeMapping($miaclient.MIGetOriginalFilename())

# If uploading to a Team Drive, set this to 'true'
$supportsTeamDrives = 'false'

# Set the file metadata
$uploadMetadata = @{
originalFilename = $miaclient.MIGetOriginalFilename()
name = $miaclient.MIGetOriginalFilename()
description = $sourceItem.VersionInfo.FileDescription
#parents = @('teamDriveid or folderId') # Include to upload to a specific folder
#teamDriveId = ‘teamDriveId’ # Include to upload to a specific teamdrive
}

# Set the upload body
$uploadBody = @"
--boundary
Content-Type: application/json; charset=UTF-8
$($uploadMetadata | ConvertTo-Json)
--boundary
Content-Transfer-Encoding: base64
Content-Type: $sourceMime
$sourceBase64
--boundary--
"@

# Set the upload headers
$uploadHeaders = @{
"Authorization" = "Bearer $accessToken"
"Content-Type" = 'multipart/related; boundary=boundary'
"Content-Length" = $uploadBody.Length
}

# Perform the upload
$response = Invoke-RestMethod -Uri "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart&supportsTeamDrives=$supportsTeamDrives" -Method Post -Headers $uploadHeaders -Body $uploadBody

Not so difficult right?

 

Auditing and Error Control for Automated File Transfers

 

With file transfers to Google Cloud being automated, you might want to look at including some reporting and auditing capabilities to keep a track of your masterpiece.

MOVEit Automation is a great tool which allows you to automate the movement of files and script execution, such as the one above.

It contains capabilities to be able to audit the movement of every file, the time consumed moving it and the final outcome. In addition it can automate error handling, such as what to do when Google Cloud becomes unavailable or if the file is locked and cannot be moved.

Ipswitch MOVEit Automation Automated File Transfers

Pro2col are specialists in managed file transfer, automated transfers and MFT solutions like MOVEit, GoAnywhere, Globalscape and Axway solutions. Servicing the Northern European market with nearly a decade of product experience and awards to match.

If you would like to speak to one of our solution specialists about automated file movements and Managed File Transfer you can book a short call by clicking here.

 

About the Author

 
Dom v2

 

Dominik Collins is a Technical Consultant with a background in cross-platform IT infrastructure, workflow automation, and asset management for high-performance creative environments. Having worked with some of the leading VFX studios and post-production facilities, Dominik is used to operating in fast-paced environments and has established himself as the go-to expert for complex technical solutions, and seamless cross-platform system management.