Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Unregister-Event -SourceIdentifier MyNewEmailAlert
- $ol = New-Object -ComObject Outlook.Application
- $Action = {
- $path ="A:\New Folder"
- if(Test-Path $path){
- Remove-Item -Path $path
- }
- New-Item -Path $path -ItemType Directory
- }
- $null = Register-ObjectEvent $ol NewMailEx -SourceIdentifier MyNewEmailAlert -Action $Action
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement