File Cloud Gateway PowerShell Cmdlets – Setup and Configuration Guidelines
This document provides guidelines for configuring and managing File Cloud Gateway (FCG) using PowerShell cmdlets. These cmdlets help administrators set up storage, manage volume mappings, configure cache and snapshot behavior, and maintain subscription settings in a consistent and efficient manner.
Prerequisites
Before executing the cmdlets, ensure the following requirements are met:
PowerShell Version:
The cmdlet requires PowerShell 7.5.1 or later.
You can verify your current version using:
$PSVersionTable.PSVersion
Command Output
All cmdlets return a CommandResult object.
CommandResult Structure
| Property | Type | Description |
|---|---|---|
| Status | string | Execution status (SUCCESS, FAILURE, WARNING, INFO) |
| CommandName | string | Name of the executed cmdlet |
| IsSuccess | bool | Indicates success or failure |
| Message | string | Detailed result message |
| Details | object | Contains output data or additional info |
Available Cmdlets Overview
| Module | Cmdlets |
| Storage Configuration | Get-FCGStorageConfigurations Add-FCGStorageConfiguration Set-FCGStorageConfiguration Remove-FCGStorageConfiguration Test-FCGStorageEndpoint |
| Volume Configuration | Get-FCGVolumeConfigurations Add-FCGVolumeConfiguration Set-FCGVolumeConfiguration Remove-FCGVolumeConfiguration |
| License Configuration | Get-FCGSaasSubscriptionId Set-FCGSaasSubscriptionId |
| Advanced Configuration | Get-FCGCacheFolderPath Set-FCGCacheFolderPath Get-FCGSnapshotFrequency Set-FCGSnapshotFrequency Get-FCGCacheCleanerFrequency Set-FCGCacheCleanerFrequency Get-FCGPurgeOnFlush Set-FCGPurgeOnFlush |
1. Storage Configuration
Cmdlet: Get-FCGStorageConfigurations
Description
Retrieves all configured storage aliases and their associated details.
Get-FCGStorageConfigurations


Cmdlet: Add-FCGStorageConfiguration
Description
Registers a new storage configuration in FCG. This is used to store metadata and snapshots in Azure Blob Storage.
Add-FCGStorageConfiguration `-Name <string> `-StorageType <string> `-ConnectionParams <Dictionary[string,string]> `-MetadataTableName <string> `-MetadataProcessTableName <string> `-SnapshotsContainerName <string>
Example
$connectionParams = New-Object 'System.Collections.Generic.Dictionary[string,string]'$connectionParams.Add("containerName", "fcg-container")$connectionParams.Add("connectionString", "<connectionString>")Add-FCGStorageConfiguration -Name AzureBlobConfig1 `-StorageType "azureblob" `-ConnectionParams $connectionParams `-MetadataTableName caevesmetadata `-MetadataProcessTableName caevesmetadataprocess `-SnapshotsContainerName caevessnapshots
Cmdlet: Set-FCGStorageConfiguration
Description
Updates an existing storage configuration.
Set-FCGStorageConfiguration `-Name <string> `-ConnectionParams <Dictionary[string,string]> `-MetadataTableName <string> `-MetadataProcessTableName <string> `-SnapshotsContainerName <string>
Example
$connectionParams = New-Object 'System.Collections.Generic.Dictionary[string,string]'$connectionParams.Add("containerName", "fcgblobcontainer")$connectionParams.Add("connectionString", "<connectionString>")Set-FCGStorageConfiguration -Name AzureBlobConfig1 `-ConnectionParams $connectionParams `-SnapshotsContainerName caevesSnapshotsTable
Cmdlet: Remove-FCGStorageConfiguration
Description
Deletes an existing storage configuration.
Remove-FCGStorageConfiguration -Name AzureBlobConfig1
Cmdlet: Test-FCGStorageEndpoint
Description
Validates connectivity and accessibility of the configured storage endpoint.
Test-FCGStorageEndpoint -Name nilimastgvm

2. Volume Configuration
Cmdlet: Get-FCGVolumeConfigurations
Description
Retrieves all configured volume mappings.
Get-FCGVolumeConfigurations

Cmdlet: Add-FCGVolumeConfiguration
Description
Creates a new volume configuration by linking a metadata volume with storage endpoints.
Add-FCGVolumeConfiguration [-MetadataVolume <string>] [-PrimaryEndpoint <string>] [-SecondaryEndpoint <string>]
Example
Add-FCGVolumeConfiguration `-MetadataVolume "F:\" `-PrimaryEndpoint "nilimastgvm" `-SecondaryEndpoint "nilimastgvm"
Prerequisites
-
Storage endpoints must already exist
-
Metadata volume must be accessible
-
Required permissions must be granted
Cmdlet: Set-FCGVolumeConfiguration
Description
Updates an existing volume configuration.
Set-FCGVolumeConfiguration -MetadataVolume <string> -PrimaryEndpoint <string> -SecondaryEndpoint <string[]>
Example
Set-FCGVolumeConfiguration `-MetadataVolume "F:\" `-PrimaryEndpoint "nilimastgvm" `-SecondaryEndpoint "nilimastgvm"
Cmdlet: Remove-FCGVolumeConfiguration
Description
Deletes a volume configuration.
Remove-FCGVolumeConfiguration -MetadataVolume <string>
Example
Remove-FCGVolumeConfiguration -MetadataVolume "F:\"
3. License Configuration
Cmdlet: Get-FCGSaasSubscriptionId
Description
Retrieves the configured SaaS subscription ID.
Get-FCGSaasSubscriptionId

Cmdlet: Set-FCGSaasSubscriptionId
Description
Sets the SaaS subscription ID.
Set-FCGSaasSubscriptionId -SubscriptionId <string>
Example
Set-FCGSaasSubscriptionId -SubscriptionId “12345-abcde-67890”
4. Advanced Configuration
Cmdlet: Set-FCGCacheFolderPath
Description
Configures the cache directory path.
Set-FCGCacheFolderPath -Path <string>
Example
Set-FCGCacheFolderPath -Path "G:\Cache"

Cmdlet: Get-FCGCacheFolderPath
Description
Retrieves the configured cache directory path.
Get-FCGCacheFolderPath

Cmdlet: Set-FCGSnapshotFrequency
Description
Sets snapshot creation frequency (in hours).
Set-FCGSnapshotFrequency -Value <int>
Example
Set-FCGSnapshotFrequency -Value 24 # Frequency in hours
Cmdlet: Get-FCGSnapshotFrequency
Description
Retrieves snapshot frequency.
Get-FCGSnapshotFrequency
Cmdlet: Set-FCGCacheCleanerFrequency
Description
Configures cache cleanup frequency (in hours).
Set-FCGCacheCleanerFrequency -Value <Integer>
Example
Set-FCGCacheCleanerFrequency -Value 12

Cmdlet: Get-FCGCacheCleanerFrequency
Description
Retrieves cache cleaner frequency.
Get-FCGCacheCleanerFrequency

Get Current Purge on Flush Status
Cmdlet: Get-FCGPurgeOnFlush
Get-FCGPurgeOnFlush

Enable Purge on Flush setting
Cmdlet: Get-FCGPurgeOnFlush
Set-FCGPurgeOnFlush -value <Integer>
Example
Set-FCGPurgeOnFlush -value 1

Disable Purge on Flush setting
Set-FCGPurgeOnFlush -value 0

Conclusion
These guidelines provide a structured approach for configuring File Cloud Gateway using PowerShell cmdlets, ensuring consistency, reliability, and ease of management across environments.