From 67e82b3f161eb553355dd3e4673df74a98cbda38 Mon Sep 17 00:00:00 2001 From: Joel Timothy Oh Date: Tue, 3 Aug 2021 05:03:59 +0800 Subject: [PATCH] Revise New-ItemLink parameter order --- README.md | 2 +- src/ItemLinkManagement/Public/New-ItemLink.ps1 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 )