Category

PowerShell

PowerShell Basics, PowerShell Scripts, PowerShell Modules, PowerShell Remoting, PowerShell Functions, PowerShell Active Directory, PowerShell Security, PowerShell Error Handling, PowerShell Variables, PowerShell Objects, PowerShell Package Management, PowerShell, PSCustomObject, cmdlet, PowerShell pipeline, PowerShell ISE, PowerShell 7, pwsh, Get-Command, Get-Help, Invoke-RestMethod, Import-Module

Page 3
Cleanup disabled users from AD Group/s

Cleanup disabled users from AD Group/s

Cleanup disabled accounts from groups is one of the most boring job, and also take lots of time. Manually it's almost impossible to maintain. Recently I had a request to perform such task for many groups, so, I wrote a script to do it automatically on behalf of me. I am now sharing this script, hoping this might help you as well. This script will do following task automatically. Get…

Saugata Datta2 min read6.5K
Multi-Thread Super-Fast Software Inventory Scan using WSMan (PowerShell Remoting)

Multi-Thread Super-Fast Software Inventory Scan using WSMan (PowerShell Remoting)

Recently I was asked to pull the software inventory report from multiple severs hosted in Azure, but unfortunately pulling data from WMI not allowed, only PS Remoting was enabled, so I made some changes on my previous script and used Invoke-command to pull the date for all the servers. It was easy and the most effective way to extract that report and only took 5 minute to get the data. :)…

Saugata Datta2 min read9K
Multi-Threading Super-Fast Disk Utilization Report using Background Jobs in PowerShell

Multi-Threading Super-Fast Disk Utilization Report using Background Jobs in PowerShell

Automate task using script is always helpful, it reduced human error and efforts, but sometimes it still takes a lots of time to execute same command on multiple remote servers one by one. For example, my disk utilization script, it works perfectly fine, but taking lots of time to generate report for thousands of servers. To get the result faster I started looking for using Background Jobs, and the result…

Saugata Datta3 min read7.8K
Task Scheduler Error “A specified logon session does not exist” – Fix via Command Line and PowerShell for Scripting

Task Scheduler Error “A specified logon session does not exist” – Fix via Command Line and PowerShell for Scripting

This is very know issue, if you search internet, you will get multiple blog post with same solution for this issue, and if you follow the steps, it actually resolve this issue. In simple word, solution of this problem is Logon to the faulty system. Open SECPOL.MSC from Run Go to Security Settings | Local Policies | Security Options Open Network access: Do not allow storage of passwords and credentials…

Saugata Datta3 min read7.6K
Playing with String in PowerShell

Playing with String in PowerShell

As being a Windows Administrator I use PowerShell every day and the best part of it is, I learn something new every day. In simple word PowerShell can make your life easier, and I think you all agreed with it. I often requested to pull various reports from various sources and it was not always possible to get the exact report by executing one or more cmdlet. Sometimes had to manipulate…

Saugata Datta3 min read7K
Setup your own Monitoring – Disk Space Utilization Monitoring tool for free

Setup your own Monitoring – Disk Space Utilization Monitoring tool for free

It is always recommended to keep tracking of the disk space utilization for you servers. This will help us to get the idea of our future requirement. There are multiple tools available for track this but you have to pay for most of them. Recently I also had similar kind of requirement and I was asked to provide the free solution for this. There are some free tools available but…

Saugata Datta3 min read8.4K
Migrating a VMWARE VM to AWS using AWS PowerShell

Migrating a VMWARE VM to AWS using AWS PowerShell

In this topic we will describes the necessary steps to migrate a VMWare VM to the Amazon Web Services (AWS) using PowerShell. You could also migrate VM using AWS command line tools, but I found using PowerShell is much easier than command line tools. Requirements: AWS Tools for Windows PowerShell http://aws.amazon.com/powershell/ IAM account to authenticate. Basic knowledge on PowerShell. Preparing VMware Guest: There are few things need to be fix…

Saugata Datta3 min read11.2K
Port Scanner using PowerShell with Email Notification

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. #Which port to scan $port = 3389 #Path…

Saugata Datta1 min read11.1K
Set File System Auditing via PowerShell

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…

Saugata Datta2 min read41K
AWS EBS Snapshots Automation (Disaster Recovery) from Windows PowerShell

AWS EBS Snapshots Automation (Disaster Recovery) from Windows PowerShell

It is always a good idea to reduce hardware dependencies by moving your data to the cloud. Cloud is much more flexible than traditional hardware infrastructure including VMWare. But you still have to consider the ability of recovering data as and when required. This always helps you to keep your business running with minimal interruption. In AWS, there are several possibilities for implementing an effective backup strategy. EBS snapshots are…

Saugata Datta3 min read22.7K
NTFS Permission issue with TAKEOWN & ICACLS

NTFS Permission issue with TAKEOWN & ICACLS

Most of us using TAKEOWN or ICACLS for taking ownership from command prompt, and both of them are simple to use. We generally use TAKEOWN or ICACLS with following switches to taking the ownership. takeown /F "PATH" /R /D Y /A icacls "PATH" /T /setowner Administrators But unfortunately, TAKEOWN & ICACLS both might failed on certain scenario, as there are some undocumented limitation. We had incident where we tried to…

Saugata Datta2 min read48.8K
Automatic NT-Backup (System State Backup) with retention period and e-mail notification after complete.

Automatic NT-Backup (System State Backup) with retention period and e-mail notification after complete.

A simple script for automatic System State backup where you can easily set backup retention period and it also send you an e-mail notification after completion. With this script you can also archive backup log and if you wish u can also set backup log retention period. It can also set backup files with date stamp. For e.g., SysBackup_ComputerName_24-03-2009.bkf You need two small utility, Blat.exe for sending mail, you can…

Saugata Datta3 min read16.7K
🧰

Free Tools: IP, DNS, SSL

20+ free network and other tools in one place. No signup. Click explore or visit https://technochat.in/tools

Explore