Posts Tagged ‘Tips’

List Users who have logged on to XenApp

Friday, October 7th, 2011

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.

How to create masses of data for testing

Tuesday, January 25th, 2011

If you ever want to test something that requires lots of files to be created, whether it is is configuring Robocopy of writing files to disk to test throughput or for alert generation then HP have a great free tool you can use, CreateData.exe. Download it here.

If you want a similar tool to generate “read” type access then the ReadTool can be downloaded here.

Create your own Event Viewer Entries

Thursday, January 13th, 2011

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 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

Tuesday, April 6th, 2010

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

Monday, November 2nd, 2009

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

Sunday, November 1st, 2009
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:\myfiles\ipconfigresults.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:\myfiles\ipconfigresults.txt & c:\myfiles\ipconfigresults.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.