Skip to content

Commit

Permalink
Add example with Force = true
Browse files Browse the repository at this point in the history
  • Loading branch information
danielboth committed Oct 17, 2019
1 parent 63349c7 commit dbb8f9f
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions Examples/Resources/SmbShare/4-SmbShare_RecreateShare_Config.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<#PSScriptInfo
.VERSION 1.0.0
.GUID d0847694-6a83-4f5b-bf6f-30cb078033bc
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT (c) Microsoft Corporation. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/ComputerManagementDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/ComputerManagementDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>

#Requires -module ComputerManagementDsc

<#
.DESCRIPTION
This example creates an SMB share named 'Share' for the path 'C:\Share1',
using the default values of the cmdlet `New-SmbShare`. If the share
already exists, it will drop the share and recreate it on the new path
because Force is set to true.
.NOTES
To know the default values, see the documentation for the cmdlet
`New-SmbShare`.
#>
Configuration SmbShare_RecreateShare_Config
{
Import-DscResource -ModuleName ComputerManagementDsc

Node localhost
{
SmbShare 'RecreateShare'
{
Name = 'Share'
Path = 'C:\Share1'
Force = $true
}
}
}

0 comments on commit dbb8f9f

Please sign in to comment.