Applying passport in India – Still a stupid affair in name of police verification

Not to say things don’t change in India as there been some rapid changes in last decade. We have moved past of LPG lines, we have moved past of accepting daily power cuts as fate in a developing nation, we have moved past of considering trains as only way of transport due to higher prices of planes and bad roads… but as much things change, some still remain the same. Indian red tape and police system can be considered something like that.

Its been almost 3.5 yrs since I wrote about my last experience with applying passport in india and proudly bragged that situation seem to have improved much better than the past, but only to find from recent experience that the systematic nonsense continues to harass citizens same way since always.

In my last attempt for passport, I noticed only one stupidity that PSK refused to take AADHAAR photocopy on counter while this is just a number, which can be verified by the fingerprint scan or other means anyway installed inside PSK and this time it came about police verification.

Continue reading “Applying passport in India – Still a stupid affair in name of police verification”

Powershell: Servers inventory

Quite many months since when I might have written a blog post. Life been quite busy at workplace and home end both. Thought to share yet another PowerShell script, which might be quite useful for System Admins.

This covers CPU, Memory, Network cards, Disks etc and other parameters can be added accordingly.

You might run into issues with some servers if WMI related ports not open on them. Below CMD should help on that

Continue reading “Powershell: Servers inventory”

PowerShell: File Share inventory for all DFS shares – Permissions and Size

Managing file servers in a large environment where there are more than one administrators might be a tough job if you do not have audit tool keeping track of changes in File Shares. Similar problematic part is migrating stuff from one server to another. DFS helps, but how to document everything??

Continue reading “PowerShell: File Share inventory for all DFS shares – Permissions and Size”

PowerShell: Quickly finding source of Brute Force attack on O365 Tenant

A small PowerShell Script to quickly find out source IPs in case of a brute force attack on O365 Infra. This can save manual efforts and can improve turnaround time to mitigate the issue in Infrastructures which still not using MFA or ExtraNetLockOut. This is just a basic code. One can set email alerts basis the thresholds or even can write a custom event on any of the server to be picked by SCOM or OMS.

Continue reading “PowerShell: Quickly finding source of Brute Force attack on O365 Tenant”

PowerShell: DNS Inventory – All records

Here goes the PowerShell script for DNS Inventory for AD Integrated DNS zones. This script needs to be altered to set variable for DC Name and once ran, it would fetch details from each zone and would save it in separate files.

Updated the code to provide option to dynamic selection of DNS Server. Thanks for input from @singhalyogi22

Note: Skipping SOA records etc to avoid complexity

Continue reading “PowerShell: DNS Inventory – All records”

PowerShell: DHCP settings, leases and reservations inventory

Another day, another PowerShell script.. this time to get DHCP settings, leases and reservations from all DHCP Servers in current domain. Pre-requisite is all DHCP Servers should be Windows 2012 based and WinRM should be enabled on all of them.

Continue reading “PowerShell: DHCP settings, leases and reservations inventory”

PowerShell: Script for patching Domain Servers remotely

In line with the last post on File Server inventory, here comes the another script to perform patching for Domain Servers from a remote machine.

PowerShell already has methods to perform patching on any server, where we can list what all patches are available and create a downloader to download and install them all, but a limitation to the capability is, the same can not be done remotely. As a workaround for that, we would be creating schedule task on the remote machine via the script and performing the patching via triggering that schedule task.

It would involve two scripts InstallPatches.ps1 and PatchServer.ps1, whose code I would be listing below. It would make use of c:\temp directory and would be keeping logs and scripts in the same location. Also we would need any shared location, where we would keep a copy of InstallPatches.ps1, which then would be copied dynamically over the servers during patching. I have kept script source path as “\\ABCXYZ\sources\installpatches.ps1” while it can be changed as per your environment.

Continue reading “PowerShell: Script for patching Domain Servers remotely”