PowerShell has facility where in your can view the commands executed in the current shell. You can use Get-History cmdlet to see all the previously executed commands. Note that PowerShell V3 & above will show all commands you executed while the PowerShell V2 shows only last 32 commands you executed. Now the question is how […]

{ 0 comments }

I came across a situation today to find out what kind of a encoding a file is using. I want to understand the encoding because if I process the text file without that, the results might change. My search on Internet made me land at http://poshcode.org/2153 which gave a nice script for identifying the encoding […]

{ 0 comments }

There are several ways to verify if a computer is connected to network. Some prefer querying the IP address details, enable status, and ping test to default gateway. Each kind of approach has its advantages and some kind of approaches are preferred based on the requirements. In this post I will show you easiest way […]

{ 0 comments }

As you might already aware, PowerShell v5 preview is out and like any other powershell enthusiasts, I want to understand what is special in this release. I hunt for features list is going on and I will keep this post updated as I progress with my findings. PowerShell V5 preview is released on 3rd April […]

{ 1 comment }

Microsoft released PowerShell v5 Preview yesterday. I did quick search on internet about what is special about this release. Though I couldn’t find any exiting articles, the one that grabbed my attention is OneGet module. What is OneGet module and what it has? Get-Command -Module oneget So basically, it is a module that allows packaged […]

{ 0 comments }

Today I got some requirement to verify the database name and DB server details of WSUS servers. This configuration is available inside HKLM\Software\Microsoft\Update Services\Server\Setup registry key of each WSUS server. So, I can query this registry value to find out what is the name of WSUS DB and DB server. But out of curiosity, I […]

{ 0 comments }

While working on a script that does file copy using Robocopy utility, I had the need to capture the exit code from the process I started. I relied on System.Diagnostics.Process dotnet class to start the copy operation using robocopy because it gives me an option to get the return code after the process completion. So […]

{ 0 comments }

A application can go unresponsive because of various reasons. Until, we identify and kill such applications, the system hands and creates log of inconvenience to the user. Such applications also consume resources and make system unstable. So, let us see how to identify the not responding applications in a computer. When I say “Not Responding”, […]

{ 0 comments }

Whenever a server reboot is performed, a big question comes into mind is, “All services started properly”? Let us discuss this topic a bit more in this post. Normal approach to verify services status after server restart is looking for automatic status and their current state(start/stop). While this is good for Operating system related services, […]

{ 3 comments }

What is the difference between Write-Host and Write-Output?? I came across a useful article from PowerShell inventor about why you should not use Write-Host in general context unless you want to utilize specific features of it. It is a good read and worth having a peek. To output any data to console it is wiser […]

{ 0 comments }