Showing posts from 2013

VB.NET Run DOS Command

VB.NET  Execute DOS Command

How to execute command line using VB.NET?

Quick Snippet to Run a DOS Command executable file

Let's take an example using iexplore.exe and shutdown.exe command.

Iexplore.exe which is located on program files folder.

To verify the file open windows explorer and go to Program Files select Internet Explorer folder.

Or via command line press "Windows key +R" and type "cmd" on the text box  and press enter. It will open a command prompt window.

In command prompt window:

Type: cd \progra~1\Internet Explorer and press enter.

type: Iexplore.exe (this will open a web page for

Using the shutdown command:
type: Shutdown /R /F /T 07 (reboot the computer and force open files to close within 7 seconds)

It's quite straight forward to use those commands via the command prompt but how to execute those command lines using VB.Net?

Maybe the first thought is to create a string with the command  and call the string with "process.…

Hard Times in Life

It's quite easy to tell your self or tell others, Be Strong, Be Tough and Don't Quit.

But how to be strong when everything seems to be hopeless.

How long must endure the pain?

Life is too short, and it is indeed short.

O God please give me the courage to bear this sorrow.

All things beneath the sun are vanities.

Please check out this link, a tragic moment for my home town:

Free Catholic Prayer Android App with no ads.

WMIC get computer name

WMIC get computer model, manufacturer, computer name and  username.
WMIC is a command-line tool and that can generate information about computer model, its manufacturer, its username and other informations depending on the parameters provided.
Why would you need a command line tool if there’s a GUI to check?
If you have 20 or 100 computers, or even more. It’s quite a big task just checking the GUI to check the computer model and username.
If you have remote computers, you need to delegate someone in the remote office or location to check.
Or you can just write a batch file or script to automate the task.
Here’s the code below on how get computer model, manufacturer and the username.
Open an elevated command prompt and type:
wmic computersystem get "Model","Manufacturer", "Name", "UserName"
Just copy and paste the code above, the word “computersystem” does not need to be change to a computer name.
A sample output below will be generated if the co…

Send files via bluetooth

Missing bluetooth icon on taskbar.

And unable to send bluetooth files using your laptop or desktop.

To open bluetooth via taskbar:

This will work provided the PC and the other device has already been paired and configure with the authentication settings to talk to each other.

Well, quick and easy way is to use the command line executable file.

Press Win Key + R, to open the run box.

On the run box, type "fsquirt" without quotes and press enter.

Or go to search box and type "fsquirt" without quotes and press enter.

After pressing enter bluetooth transfer file window will open.

Click on "Send Files" to transfer files on the computer to other bluetooth device.

If there's a bluetooth device already configured and paired with the computer, you need to select which bluetooth device you want to send the files.

Upon selecting which device to transfer the files. The browse window will open and select the files you want to send.

Once finish selecting the files…

Powershell Reset Active Directory Password

How to reset a user account password in Active Directory?

PowerShell can automate resetting of  user accounts password in  Active Directory.

Resetting user account password in Active Directory is quite easy and straight forward.

It will be an easy task if you will be resetting one or two users within a day or a week.

What if there will be a need to reset a bulk of user accounts?

And the bulk of user accounts the password needs to be different from other accounts?

Then it's not fun anymore to reset password one by one, it's a pain on the neck.

Or what if your boss goes to your desk or you receive a call, telling you that I want you  to reset AD user account  password for all the users in this department and I want it now! As in now! Right now!

Then your phone will ring again, I forgot to tell you "don't make the same password  for all the users".

The department that your boss is talking about has 100 employees.

What would be the first thing that would cross your …

Windows Server 2012 Backup System State

How to use task scheduler to back up Windows 2012 server system state
Open Task scheduler on Windows 2012, by opening “Control Panel” and clicking on “Administrative Tools” and selecting “Task Scheduler”.
Or you can just go to the start menu and type “task” to search “Task Scheduler” and click "Task Scheduler" on search result to open.

On “Task Scheduler” window, click on “Create Basic Task” which can be found on the upper right corner of the task scheduler  window.
Upon clicking on “Create Basic Task”, the wizard will open and type the name of the Task.
Since the task is to backup “System State” it would be good to name it “Backup System State”  if you’re backing up multiple servers then you can include the name of the server also.
If you have multiple backups and you don’t have any idea for which server is the system state backup then basically it’s good as nothing.
So naming convention is quite important to avoid confusion.
If you want to be quite specific, you can write…

PowerShell Shutdown Computers

PowerShell to ask confirmation before shutting down the remote PC or server.

Shutdown / Restart remote servers or computers in one go or select or decide which computers / servers to shutdown.

Just want to share this piece of PowerShell code snippet to shutdown or restart remote computers but don't try this at the production environment unless you really have a good reason to do so.

Or if you just want to have some fun give it a shot.

This piece of snippet will only work provided the user account in which you execute this code has the right to shutdown the computers or servers.

First, create a text file name it "computers.txt" or to any filename you like.

If you change the filename make sure it's the variable you include on the code.

On "computers.txt", enter the name of computers you want to shutdown.

The code below will prompt to either shutdown the computer or not.

This PowerShell code will be helpful if need to shutdown or restart specific computers.


VBScript Get Servers Data

VBScript Get HDD Space, Memory Usage, and CPU Usage

As the odds say, old habits are hard to break.

If you've been around working for IT for quite some time.

I'm sure you had fallen in love with VBScript.

VBScript has been around for quite some time and still does it magic and able to deliver good results.

VBScript is quite straight forward, all you need is a notepad and a keyboard.

Of course, it sounds simple, but it's really not.

What I mean is you don't need to install other software to get VBScript up and running.

Of course, you need to have Windows OS and a piece of code in mind to write something on the notepad.

The "I Love You" virus was a VBScript and a lot of computers fall in love with it.

Well, I'm not encouraging someone to write a virus.

Which other people really love to do it as their past time or a way of living.

The piece of VBScript below is able to get hard disk space on any server specified on the list.

It will get the hard disk space on…

Powershell Code Snippet to list all sub folders and its modified date

Code snippet below is able to get the folder names and its modified date and write the output to a text file.

I used this piece of code to get hundreds of subfolders in a shared folder and Powershell did a really nice job, the script just runs in a few seconds and able to get the list of the folder and it’s modified date.

The reason I made this piece code is for folder archiving purposes.

To check one by one a hundreds of folders is not just practical. Unless you really have a nice reason to do it.

To check which folder is being currently used or which folder has never been accessed for a couple of years.

This piece of Powershell code snippet below can do the job.

To run Powershell script, most of the sites will recommend to get a self-signed certificate and modify Powershell settings to trust self-signed cert.

I did run this piece of code without generating a self –signed certificate.

Powershell has a GUI interface in which you can run the code, without any hassle of configuring …

Windows 7 Explorer Crashes / Windows 7 Right Click crashes Windows Explorer

When windows 7 explorer crashes upon right click and or checking File properties.

It’s quite annoying when this things happen because Windows will automatically restart the desktop  and it’s quite frightening when you are in the middle of doing something and you haven’t save.
And all of a sudden it will just show, Windows Explorer has stopped working and your desktop is gone.
Sometimes if the odds is against the luck, it might hang your whole system.
Whatever you’re working and you haven’t save, you might need to start all over again. If you search the web, you will find an enormous amount of information to solve this issue.
As my own rule of thumb, I hate to install third party solutions. It might just install a spyware or a malware or just collect some data on your PC and worst never solve the problem.
I had encountered this problem, every time the user right clicks explorer crashes.
The user  open windows explorer click on any file, click on File menu  windows explorer also crashes…

IPV4 Address - Subnetting Tutorial

IPV4 Address

IPV4 Address is 32bit.
IPV4 has public and private IP Address.
Public IP Addresses is routable over the internet.
Private IP Addresses as it names implies is private,  which is basically for private use and is not routable over the internet. Use by private companies or private individuals.
Logically, private IP just goes with the saying. What happens in LA stays in LA. Likewise a private IP Address if it use at home then that IP Address stays at home. It won’t even go out to the neighbor, unless you have a Wifi and the neighbor crack your Wifi or wireless password, then that’s an exemption.

Private IP Address Classes and Range
Class A – Class B – Class C –

IPV4 is 32 bit or four octets, each octet  is separated by dot or period.

Example of an IPV4 Address, if you count the number of x it’s  32 x’es.
xxx xxxx . xxxx xxxx . xxxx xxxx . xxxx xxx
Since IPV4 is  32 bit, so it is compose of  32 bi…