Skip to content

Instantly share code, notes, and snippets.

@janegilring
Created August 3, 2019 05:13
Show Gist options
  • Save janegilring/8eae732b07d0f99306ba7b36d8fc0ff1 to your computer and use it in GitHub Desktop.
Save janegilring/8eae732b07d0f99306ba7b36d8fc0ff1 to your computer and use it in GitHub Desktop.
Example of using the AzureFileSyncServerEndpoint DSC resource
Configuration HybridFileServer
{
param (
$AzureCredential = (Get-Credential)
)
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -ModuleName AzureFileSyncAgentDsc -ModuleVersion 1.1.5
Node FS01 {
AzureFileSyncServerEndpoint Data {
AzureSubscriptionId = 'c0fda861-1234-5678-9ede-fa1908101500'
AzureFileSyncResourceGroup = 'File-Sync-Rg'
AzureFileSyncInstanceName = 'FileSync01'
AzureFileSyncGroup = 'FileServers'
AzureCredential = $AzureCredential
ServerLocalPath = 'D:\Data'
CloudTiering = $true
TierFilesOlderThanDays = '365'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment