Skip to main content


Showing posts from August, 2014

Set Active Directory User Properties via PowerShell

Below is an example on how to set programmatically the Active Directory object using PowerShell script.
This will come handy if there's a need to edit or set AD User object properties.
To edit one or two can be done manually, but to set 100 or thousands user object properties can be time consuming and prone to mistakes.
But since PowerShell will carry the entire burden on the background, then life will be easier.
To start the script, open a Notepad and set the Active Directory User Name and other object user properties that need to be changed, updated or add a new data to it.
For example if you want to set telephone numbers and addresses for all users in Active Directory. Using a script will be the best option rather than doing it manually.

In this example, Telephone Number and Address will be set via script using PowerShell script.

Open  Notepad and set the details of the user telephone number and address that will be set.

Data format of the notepad will be, Active Directory Use…

Text to speech using Microsoft Word

Enable text to speech using Microsoft Word 2010 and newer version.
This guide below will enable text to speech of Microsoft Word which is partly hidden deep on the Word options.
This guide will be the same procedure on how to enable this option on Outlook, Power Point and Excel.
If you feel tired of reading, but need to read a particular document.
Well, let the Word read it for you. 
Sometimes listening is much better than reading.
If you disagree, then just keep it to yourself. As ice cream has many flavors, different persons from different walk of life have also its own set of liking.
Anyway, once you purchase a Microsoft Office. It would be better to make use this feature since you had paid for it.
Screen shot below was taken using Microsoft Word 2010.
Click on “File” and on the drop down menu, click on “options”.

 Then a new window will open. 
Click on "Customize Ribbon".

Click on the small "drop down arrow",  VBA programmers call it combo box. Android programmer…

Running out of Space on C drive

If you’re running out of space on C drive, clean the temp drive to free up some space.
It might have been years that it has not been clean or emptied for years.
To easily access Temp drive on Windows 7, Windows 8 or even Windows XP, just press the “Windows Key” + “R” key on your keyboard and it will open the “Run Box”. (see screen shot below)

And on the run box type “%TEMP%” don’t include the quotes when typing and press OK or enter. (see Screenshot below)

After pressing the “ok” button, it will open the Temp Folder and you will be able to see a lot of junk files which is just taking up space on the C drive.
Press “Ctrl+A” and it will highlight or select all files and folder in the temp directory, and press delete button.
Files will go the “Recycle bin”, empty the recycle bin to permanently delete the files and folder. Right click on the Recycle Bin Icon on the desktop and you will find an option "Empty Recycle Bin".

And you can also clean up the “Temporary Internet Files” …

View and Set Time Zone via command line

Use "TZUTIL.EXE" (TimeZone Utility) to view the time zone set on the computer via command line.
Open command prompt and type: “tzutil /g”  (type without quotes)
And it will display the time zone that is currently set on the computer.

Example: c:\tzutil /g

Sample Output: Singapore Standard Time

Output will vary depending on the settings of the computer.

Type “tzutil /?” to view other options for the tzutil command.
To list all valid time zones, type: "tzutil /l" (type the command on the cmd prompt without quotes).
To set a time zone via command line is to set: tzutil /s "Valid Time Zone"
Example on how to set a time zone:
Tzutil /s  "W. Australia Standard Time" -- this command will set Perth Time Zone.

If got multiple computers that needs to set to the same time zone, a batch file with the command Tzutil /s "Time Zone Settings" will automate the process.

To list all valid time zone that can be set on Windows, type:

Tzutil /L

It will be …

Check for open ports in Windows

How to check which ports are open?
How to check the ports that a particular application is using?
Questions that will pop up when things go wrong, when an application does not work as expected.
When replication does not work, or access denied error occurs.
Or when an error occurs that states, a particular port is in use. Like, Port 80 is in use.

Of course the error, just gives an idea that a port is in use by another application or program but does not explicitly tells that which specific application or program is using the port.

This is where troubleshooting is necessary. An example below is given.

One scenario that I can think of is when setting up Active Directory replication; whether in the real world, or in a test lab environment.
Or even simply a port forwarding scenario on web hosting, CCTV installation or other setup,  if it doesn’t work would require troubleshooting or to check whether ports are open, ports are listening or not.
Netstat command in Windows is a good start to …

How to check windows running services and how to start a service via command line

How to check running services in Windows?
How to start or stop running services in Windows?
These two tasks are commonly needed if you’re doing IT services and even if you are a programmer.
To do these tasks; it can be done via the graphical interface or using command line.
Why bother knowing how to use command line to do the tasks?
Graphical interface is available and makes life easier.
To use graphical interface is quite easy and straight forward.
But it’s applicable to use if you’re managing two or three computers.
But what if you are managing a hundred or more computers, it’s not fun to use graphical interface and do it manually.
Command line will come to the rescue, and use scripting to automate tasks and do it automatically.
To check running services via command line, use the Windows Management Instrumentation commands or WMIC.
Open a command prompt and type:
WMIC Service List Brief
This will lists all the services regardless of the status.
To filter running or stopped service…