-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathFInd-Node.ps1
More file actions
44 lines (38 loc) · 915 Bytes
/
FInd-Node.ps1
File metadata and controls
44 lines (38 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function Find-Node {
<#
.SYNOPSIS
Short description
.DESCRIPTION
Long description
.EXAMPLE
PS C:\> <example usage>
Explanation of what the example does
.INPUTS
Inputs (if any)
.OUTPUTS
Output (if any)
.NOTES
General notes
#>
[CmdletBinding()]
param (
$File,
[Switch]$FindDescription
)
begin {
}
process {
$FilePath = Get-Item -Path $File
Write-Verbose -Message "[Find-Node] File FullName: $($FilePath.FullName)"
If ( $PSBoundParameters["FindDescription"].IsPresent ) {
Foreach ( $node in [nodeutility]::ParseFile($FilePath.FullName) ) {
$node.FindDescription()
$node
}
} Else {
[nodeutility]::ParseFile($FilePath.FullName)
}
}
end {
}
}