使用 Amazon FSx CLI 进行远程管理的一次性文件系统设置任务 PowerShell - FSx适用于 Windows 文件服务器的亚马逊

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

使用 Amazon FSx CLI 进行远程管理的一次性文件系统设置任务 PowerShell

使用FSxCLI以下 Amazon for Remote Managemen PowerShell t 命令来按照我们的最佳实践快速实施文件系统管理任务。

管理存储消耗量

使用以下命令来管理文件系统的存储消耗量。

  • 要按默认计划开启重复数据删除,请运行以下命令。

    Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock { Enable-FsxDedup }

    或者,使用以下命令在文件创建后立即对文件执行重复数据删除操作,无需任何最短文件期限。

    Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock { Set-FSxDedupConfiguration -MinimumFileAgeDays 0 }

    有关更多信息,请参阅 通过重复数据删除降低存储成本

     

  • 使用以下命令开启“跟踪”模式下的用户存储限额,该模式仅用于报告目的,不用于强制执行。

    $QuotaLimit = Quota limit in bytes $QuotaWarningLimit = Quota warning threshold in bytes Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock { Enable-FSxUserQuotas -Track -DefaultLimit $Using:QuotaLimit -DefaultWarningLimit $Using:QuotaWarningLimit }

    有关更多信息,请参阅 管理存储配额

启用影子副本,使最终用户能够将文件和文件夹恢复到以前的版本

按照默认时间表(工作日上午 7 点和中午 12 点)开启影子副本,如下所示。

Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock { Set-FsxShadowStorage -Default } Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock { Set-FsxShadowCopySchedule -Default -Confirm:$False}

有关更多信息,请参阅 将卷影副本配置为使用默认存储和计划

在传输过程中强制加密

以下命令对连接到您的文件系统的客户端强制加密。

Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock { Set-FsxSmbServerConfiguration -EncryptData $True -RejectUnencryptedAccess $True -Confirm:$False}

您可以关闭所有打开的会话,并强制当前连接的客户端使用加密重新连接。

Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock { Close-FSxSmbSession -Confirm:$False}

有关更多信息,请参阅管理传输中加密用户会话和打开的文件