From d280df102417b6ff5be1a8e8ef397edb02f7aeb8 Mon Sep 17 00:00:00 2001 From: pi-ux-ce Date: Thu, 22 Jan 2026 10:49:31 +0000 Subject: [PATCH] loop over every notebook --- OneNoteXmlExport.ps1 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/OneNoteXmlExport.ps1 b/OneNoteXmlExport.ps1 index 5e7d502..1301ff0 100644 --- a/OneNoteXmlExport.ps1 +++ b/OneNoteXmlExport.ps1 @@ -1,6 +1,3 @@ - - - # Get export folder $folder = "C:\Users\pgeeraert\Downloads\export-onenote" @@ -26,13 +23,13 @@ function LoopAndExport { foreach ($notebook in $Hierarchy.Notebooks.Notebook ) { $name = ReplaceIllegal -text $notebook.name - if($name -ccontains "Deployments"){ + Write-Output $name Write-Host $notebook.ID Write-Host $notebook.InnerXml - $destinationFile = Join-Path -Path $folder -ChildPath $name".test.xml" + $destinationFile = Join-Path -Path $folder -ChildPath $name".xml" write-output $destinationFile @@ -41,7 +38,7 @@ function LoopAndExport { $exportedXML = "$notebookInnerXml" $exportedXML |Out-File $destinationFile - }else{} + } }