diff --git a/README.md b/README.md index b8e7fff..2fa23af 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Sample definition files can be found [here](docs/samples/definitions/links). #### Parameters ```powershell -New-ItemLink [-Path] [-ItemType] {HardLink | Junction | SymbolicLink} [-Value] [-Force] [] +New-ItemLink [-Path] [-Value] [-ItemType] {HardLink | Junction | SymbolicLink} [-Force] [] ``` #### Examples diff --git a/src/ItemLinkManagement/Public/New-ItemLink.ps1 b/src/ItemLinkManagement/Public/New-ItemLink.ps1 index 984704a..7a41527 100644 --- a/src/ItemLinkManagement/Public/New-ItemLink.ps1 +++ b/src/ItemLinkManagement/Public/New-ItemLink.ps1 @@ -6,13 +6,13 @@ function New-ItemLink { [string]$Path , [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] - [ValidateSet('HardLink', 'Junction', 'SymbolicLink')] - [string]$ItemType - , - [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [string]$Value , + [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] + [ValidateSet('HardLink', 'Junction', 'SymbolicLink')] + [string]$ItemType + , [Parameter(Mandatory=$false)] [switch]$Force )