Kill Outlook + CopyPST (modification of post by papafred view diff)
diff | embed code: <script type="text/javascript" src="http://PoshCode.org/embed/1691"></script>download | new post
- $rep_du_user = $env:userprofile
- $repertoire_pst = ($rep_du_user+"\AppData\Local\Microsoft\Outlook")
- $repertoire_sauvegarde = "directory"
- #Kill de outlook
- Get-Process | Where { $_.Name -Eq "outlook" } | stop-process
- #wait and see :)
- sleep 10
- #copy des pst
- xcopy $repertoire_pst $repertoire_sauvegarde /D /E /C /R /H /I /K /Y /G
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository