From 95a6165c6fc0d8aedc8cc2de93f7bd359d691e90 Mon Sep 17 00:00:00 2001 From: benbark <72878937+benbark@users.noreply.github.com> Date: Wed, 14 Oct 2020 12:11:01 -0400 Subject: [PATCH] Create report-false-kfm-redirection This is a secondary script to process all the output files generated by KFM_Deployment.ps1 and report which text files contain false value for the three folder redirection checks. --- report-false-kfm-redirection | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 report-false-kfm-redirection diff --git a/report-false-kfm-redirection b/report-false-kfm-redirection new file mode 100644 index 0000000..2ad48d7 --- /dev/null +++ b/report-false-kfm-redirection @@ -0,0 +1,21 @@ +$desktop_false = {}.Invoke() +$documents_false = {}.Invoke() +$pictures_false = {}.Invoke() +Get-ChildItem "path to location of output files" -Filter *.txt | +ForEach-Object { + $filename = $_.FullName + Get-Content $_.FullName | ForEach-Object { + if ($_ -match "Desktop_is_in_OneDrive" -and $_ -match "False") { + $desktop_false.add($filename) + } + if ($_ -match "Documents_is_in_OneDrive" -and $_ -match "False") { + $documents_false.add($filename) + } + if ($_ -match "Pictures_is_in_OneDrive" -and $_ -match "False") { + $pictures_false.add($filename) + } + } +} +Write-Output "Desktop folder not in OD4B:" $desktop_false +Write-Output "Documents folder not in OD4B:" $documents_false +Write-Output "Pictures folder not in OD4B:" $pictures_false