This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $domain = "mydomain" | |
| $adminUsername = "someadmin" | |
| $adminPassword = "password" | |
| $targetAccount = "targetAccount" | |
| $newPassword = "NewPassword123" | |
| $path = "LDAP://$domain" | |
| $searchAccount = "(sAMAccountName=$targetAccount)" | |
| # Run via admin account |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Creates a super simple EWS Push subscription with just an http request and XML | |
| # Does nothing other than this to show it can be done minus the EWS API | |
| $subscribeRequest = "<?xml version='1.0' encoding='utf-8'?> | |
| <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' | |
| xmlns:m='http://schemas.microsoft.com/exchange/services/2006/messages' | |
| xmlns:t='http://schemas.microsoft.com/exchange/services/2006/types' | |
| xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> | |
| <soap:Header> | |
| <t:RequestServerVersion Version='Exchange2010_SP1' /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ########################################################### | |
| # Streaming Notifications Test | |
| # Date: 4.26.18 | |
| # Requires EWS Managed API 2.2 | |
| # For Testing only, not fully vetted - could have issues. | |
| # Defaults to inbox/newmailevent | |
| ########################################################### | |
| param( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ------------------------------------------------------------------------------------- | |
| # EWS PUSH SUBSCRIPTION TOOL 1.0 | |
| # This sample script is not supported in any way and is | |
| # provided AS IS without warranty of any kind. | |
| # ------------------------------------------------------------------------------------- | |
| # | |
| # INFO: | |
| # The goal of this script is to test basic functionality of an EWS Push Notifications. | |
| # There are no dependencies on EWS Managed API. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Be aware of potential performance issues: | |
| # https://docs.microsoft.com/en-us/archive/blogs/winsdk/accidental-denial-of-service-through-inefficient-program-design-part-1-watching-wmi-events-for-object-creation-e-g-win32_process | |
| $processToWatch = "'noderunner.exe'" | |
| # poll interval? | |
| $timespan = [TimeSpan]::FromSeconds(1) | |
| $whereClause = "TargetInstance ISA 'Win32_Process' and TargetInstance.Name = " + $processToWatch | |
| $wlq = New-Object System.Management.WqlEventQuery("__InstanceCreationEvent", $timespan, $whereClause) |