Port Scanner using PowerShell with Email Notification

Few days back I was asked to create a script, which will check RDP port status of multiple servers and send the result as an email notification. I have searched for few, but unfortunately there was no ready script for that. I decided to build one using PowerShell, and came out with following script.

Hope this script might help you as well.

 

Extract VM details from VCenter

Sometimes it’s a painful job to extract all the information from vCenter server. From GUI you could export information, but not all the information will be available. I was requested to extrach following information.

  • VM Name
  • Host Name
  • VM IP Address
  • Installed Guest OS
  • Power State of VM
  • Allotted number of CPU
  • Allotted total memory
  • Connected Data store
  • Host Server
  • Host Cluster

Continue reading

Set File System Auditing via PowerShell

For last few days, I was trying to figure out how to set file system auditing via command line. I was looking for this as I had to apply some specific audit policy on multiple file servers. From GUI, we could do this, but it will take hours of manual activity.

As requirement, I had to set Success Audit policy on Delete subfolders and files, delete and change permission.

There are multiple tools available, but none of them have ability to apply specific policy, so I decided to try PowerShell, and finally able to apply those audit policy successfully.
Continue reading