Examples/ConfigureAutoMountPoint-FromCalculator/ConfigureAutoMountPoints-FromCalculator.ps1
Configuration ConfigureAutoMountPointsFromCalculator { Import-DscResource -Module xExchange Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.FullName)\HelperScripts\ExchangeConfigHelper.psm1" Node $AllNodes.NodeName { #Used when passing credentials securely. This configures the thumbprint of the cert that will be used to decrypt the creds LocalConfigurationManager { CertificateId = $Node.Thumbprint } $dbMap = DBMapFromServersCsv ` -ServersCsvPath "$($PSScriptRoot)\CalculatorAndScripts\Servers.csv" ` -ServerNameInCsv $Node.ServerNameInCsv ` -DbNameReplacements @{"-nn-" = "-01-"} #Create all mount points on the server xExchAutoMountPoint AMP { Identity = $Node.NodeName AutoDagDatabasesRootFolderPath = 'C:\ExchangeDatabases' AutoDagVolumesRootFolderPath = 'C:\ExchangeVolumes' DiskToDBMap = $dbMap SpareVolumeCount = 1 VolumePrefix = 'EXVOL' } } } ###Compiles the example ConfigureAutoMountPointsFromCalculator -ConfigurationData $PSScriptRoot\ConfigureAutoMountPoints-FromCalculator-Config.psd1 ###Sets up LCM on specified computer to decrypt credentials (if passing creds securely) #Set-DscLocalConfigurationManager -Path .\ConfigureAutoMountPointsFromCalculator -Verbose -ComputerName "E15-1" ###Pushes configuration to specified computer #Start-DscConfiguration -Verbose -Wait -Path .\ConfigureAutoMountPointsFromCalculator -ComputerName "E15-1" |