Windows PowerShell

Create a HPSM9 incident with an attachment using PowerShell

Posted on

  One of our valuable customer asked a script to create a HPSM9 incident with a screen shot! Yes, it is really easy if we understand the WSDL! With no wait here is the snippet #region Attaching a screen shot $Stream = [System.IO.MemoryStream]::new() $Image = [System.Drawing.Bitmap]::new(“C:\Temp\Pictures\easy.jpg”) $Image.Save($Stream, [System.Drawing.Imaging.ImageFormat]::Jpeg) $Stream.Close() $ImageBytes = $Stream.ToArray() $Attachment = New-Object […]


Get High Priority Email Message as a Phone Call using EWS API and PowerShell

Posted on

A colleague shared a blog post and asked me a script to get high priority email using PowerShell? Well, it’s the same way  by modifying the search filter as required as shown below. $SearchFilter = [Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo]::new([Microsoft.Exchange.WebServices.Data.EmailMessageSchema]::Importance, “High”) and the below is the view to get the number of email we need from the inbox – […]


Retrieve SharePoint Site Groups Information Using PowerShell

Posted on

A colleague asked me a script to retrieve SharePoint Site Groups information by excluding the user’s information and added he couldn’t use Select-Object cmdlet to exclude user’s collection in the group property. Yes, it’s not possible! But, we have a fix for it and here is the PowerShell script to get Group properties by ignoring […]