-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63349c7
commit dbb8f9f
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
Examples/Resources/SmbShare/4-SmbShare_RecreateShare_Config.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |