Quick Access to System Properties

Tired of having to go around the houses to look at the system properties on a server or workstation ? The quickest way to gain access is to use the built-in shortcuts. Just enter the below at the start menu search box to gain fast access:

Advanced Tab – systempropertiesadvanced
Remote Tab – systempropertiesremote
Hardware Tab – systempropertieshardware
Computer Name Tab – systempropertiescomputername
System Protection Tab – systempropertiesprotection
Data Execution Prevention – systempropertiesdataexecutionprevention
Performance Options – systempropertiesperformance

Of course, you don’t have to remember all of the above, just using systempropertiesadvanced will get you straight to a single tab so that you can navigate from there.

List Users who have logged on to XenApp

Want to know who has logged on to your Citrix server ?

You can just look in the security log in event viewer and filter down but it’s so much easier using the command line. Just open up a cmd prompt and enter

auditlog (all one word)

This will let you list all the sessions from the event log and even pipe them out to a text file for later analysis or reporting.

Create your own Event Viewer Entries

There’s a little known tool that sits on your computer called eventcreate.exe. Its a command line tool and it lets you create your own event log entries in the event viewer (but not the security log for obvious reasons). You can create any event with an event ID up to 1000 (events above that value tend to be used by Microsoft).

To use the tool simply go to a command prompt and create an event with appropriate switches – you can get a list of all these and an example of how to use the tool by entering

eventcreate /? at the command prompt.

Why would you want to do this ? Well, one thing is to test any monitoring tools you have. The other thing is you can call the tool to easily write to the event log from any scripts you create, for example when deploying software from a batch file you can write an event to the log showing that the software was deployed.

My favourite use is around April Fools Day. A typical example would be:

EVENTCREATE /T ERROR /ID 69 /L APPLICATION /SO iexplore.exe /D “<username> has now spent a total of 465 hours browsing http://www.facebook.com this calendar year”

Just run the command using a remote command prompt on the users machine and then ask them and why you have received an alert about their browsing then point them to the event log.

How to format GPResult

You probably know how to run GPResult to see which policies etc are being applied to an end user workstation or server but did you know for Windows 2008 / R2 and Windows 7 there is now an easy way to format those results ? Just run the command below:

GPResult /H GPResult.html

and the results will be held in a html formatted page. Run the command below and it will display the page automatically for you.

GPResult /H GPResult.html & GPResult.html

How to duplicate entries in Excel

You know how it is. You are filling out an Excel spreadsheet and you need to copy the value above. Now, everyone knows the two ways to do this (copy /paste and to “drag and fill” the data down). Well, I was shown a third way today and thought I’d share it with you.

Simply select the cell where you want the data to be copied into and press CTRL + D (for Duplicate) and that’s it.

Before and After

Piping out to the clipboard

We all know how to pipe out to text files, right ? From a command prompt type in your command followed by > and then the name of the file to output the result to.
 
For example
 
ipconfig /all > c:myfilesipconfigresults.txt
 
will put the results of ipconfig /all into a text file called ipconfigresults.txt in the myfiles folder and the more advanced ones among us know how to not only pipe the command out but also open that text file automatically after the command has completed.
 
For example
 
ipconfig /all > c:myfilesipconfigresults.txt & c:myfilesipconfigresults.txt
 
Well, that leaves a permanent file on your hard drive which you might or might not want. Plus, if you want the text in another file you have to open the text file as above, select it all and then copy it to the clipboard.
 
Now, you can doo all of that in one go without leaving that pesky file behind – just pipe the command to the clipboard !
 
For example
 
ipconfig /all | clip
 
will put the output of the ipconfig / all command on your clipboard. You can now either paste it into notepad for a temporary file or paste it into any more permanent file, as part of producing customer documentation for example.