File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ function _InvokeNSRestApiGet {
46
46
47
47
if ($Name.Count -gt 0 ) {
48
48
foreach ($item in $Name ) {
49
- $response = _InvokeNSRestApi - Session $Session - Method Get - Type $Type - Resource $item - Action Get - Filters $Filters
49
+ $response = _InvokeNSRestApi - Session $Session - Method Get - Type $Type - Resource $item - Action Get - Filters $Filters - Arguments $Arguments
50
50
if ($response.errorcode -ne 0 ) { throw $response }
51
51
if ($Response.psobject.properties.name -contains $Type ) {
52
52
$response .$Type
Original file line number Diff line number Diff line change @@ -52,15 +52,13 @@ function Get-NSSystemFile {
52
52
param (
53
53
$Session = $Script :Session ,
54
54
55
- [Parameter (Position = 0 , ParameterSetName = ' get ' )]
55
+ [Parameter (Position = 0 , ValueFromPipeline = $true , ValueFromPipelineByPropertyName = $true )]
56
56
[string []]$Name = @ (),
57
57
58
58
[Parameter (ParameterSetName = ' search' )]
59
-
60
59
[string ]$Filename ,
61
60
62
- [Parameter (ParameterSetName = ' search' )]
63
-
61
+ [Parameter (Mandatory )]
64
62
[string ]$FileLocation
65
63
)
66
64
@@ -70,13 +68,12 @@ function Get-NSSystemFile {
70
68
71
69
process {
72
70
# Contruct a filter hash if we specified any filters
73
- $Filters = @ {}
71
+ $Filters = @ {
72
+ filelocation = $FileLocation
73
+ }
74
74
if ($PSBoundParameters.ContainsKey (' Filename' )) {
75
75
$Filters [' filename' ] = $Filename
76
76
}
77
- if ($PSBoundParameters.ContainsKey (' FileLocation' )) {
78
- $Filters [' filelocation' ] = $FileLocation
79
- }
80
77
_InvokeNSRestApiGet - Session $Session - Type systemfile - Name $Name - Arguments $Filters
81
78
}
82
- }
79
+ }
You can’t perform that action at this time.
0 commit comments