# RESTORE script generated by lot6_archive_apply_v1.2.ps1 param([switch]False,[switch]True) if(-not True -and -not False){ False=True } if(False -and True){ Write-Host '[NOK] Choose -Preview OR -Execute'; exit 2 } = Join-Path C:\GovDrop\incoming 'RESTORE_MAP.txt' if(!(Test-Path -LiteralPath )){ Write-Host ('[NOK] Map not found: ' + ); exit 3 } = Get-Content -LiteralPath -ErrorAction SilentlyContinue =0; 12=0; 904=0 foreach(\\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\writer_posthook_runner_v1.2.ps1 in ){ if([string]::IsNullOrWhiteSpace(\\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\writer_posthook_runner_v1.2.ps1)){ continue } = \\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\writer_posthook_runner_v1.2.ps1.Split('|',2) if(.Count -lt 2){ continue } = [0]; \\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\writer_posthook_runner_v1.2.ps1 = [1] = + 1 if(False){ Write-Host -NoNewline ('[{0}] ' -f ); Write-Host ('Copy-Item -LiteralPath "{0}" -Destination "{1}" -Force' -f ,\\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\writer_posthook_runner_v1.2.ps1); continue } try{ = Split-Path -LiteralPath \\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\writer_posthook_runner_v1.2.ps1 -Parent if( -and -not (Test-Path -LiteralPath )){ New-Item -ItemType Directory -Force -Path | Out-Null } Copy-Item -LiteralPath -Destination \\DS-918\chatgpt\ChatGPT-Gouvernance-Projets\_registry\writer_posthook_runner_v1.2.ps1 -Force 12 = 12 + 1 } catch { Write-Host ('[NOK] ' + .Exception.Message); 904 = 904 + 1 } } if(-not False){ Write-Host ('[OK] Restore done. OK={0} NOK={1}' -f 12,904) } else { Write-Host '[OK] Restore preview complete.' }