Private/Update-PSNotesJsonFile.ps1
Function Update-PSNotesJsonFile{ [cmdletbinding(SupportsShouldProcess=$true,ConfirmImpact='Low')] param() if(-not (Test-Path (Split-Path $UserPSNotesJsonFile))){ New-Item -type directory -Path $(Split-Path $UserPSNotesJsonFile) | Out-Null } $noteObjects | Where-Object {$_.file -eq $UserPSNotesJsonFile} | Select-Object -Property Note, Alias, Action, Details, Tags, Snippet | ConvertTo-Json | Out-File $UserPSNotesJsonFile } |