Advertisement
Guest User

Floppy_Outlook

a guest
May 14th, 2014
6,051
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Unregister-Event -SourceIdentifier MyNewEmailAlert
  2. $ol = New-Object -ComObject Outlook.Application
  3. $Action = {
  4. $path ="A:\New Folder"
  5. if(Test-Path $path){
  6. Remove-Item -Path $path
  7. }
  8. New-Item -Path $path -ItemType Directory
  9. }
  10. $null = Register-ObjectEvent $ol NewMailEx -SourceIdentifier MyNewEmailAlert -Action $Action
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement