add: parameter validation for excel and csv path in sync function
This commit is contained in:
@@ -34,12 +34,14 @@ function Sync-CISExcelAndCsvData {
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param (
|
param (
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
|
[ValidateScript({ Test-Path $_ })]
|
||||||
[string]$ExcelPath,
|
[string]$ExcelPath,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[string]$WorksheetName,
|
[string]$WorksheetName,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
|
[ValidateScript({ Test-Path $_ })]
|
||||||
[string]$CsvPath,
|
[string]$CsvPath,
|
||||||
|
|
||||||
[Parameter(Mandatory = $false)]
|
[Parameter(Mandatory = $false)]
|
||||||
|
Reference in New Issue
Block a user