Event handling & powershell