#Rest API /storage/file/copy Introduced in 9.8
1 messages · Page 1 of 1 (latest)
I noticed some of the built-in help includes a line indicating the API in-use so I cobbled together a snippet to search the help:
$Pattern = "API:"
$module = "NetApp.ONTAP"
$MatchingCommmands = [System.Collections.Generic.List[PSCustomObject]]::new()
Update-Help -Force -Module $module
$Commands = Get-Command -Module $module -All -Name *-Nc*
$Commands.Count
# $MatchingCommmands = $Commands | Foreach-Object -ThrottleLimit 5 -Parallel {
$Commands | Foreach-Object {
#Action that will run in . Reference the current object via $PSItem and if using Parallel,bring in outside variables with $USING:varname
if ($string = Get-Help -Full -Name $PSItem | Out-String -Stream | Select-String -Pattern $Pattern){
# Write-Host ("{0} - {1}" -f $PSItem.Name,$string.Line.Trim())
# $($USING:MatchingCommmands).Add($PSItem)
$MatchingCommmands.Add($PSItem)
}
}
But it wasn't fruitful...