Samenzwering! nl

Door YellowOnline op dinsdag 29 november 2011 21:30 - Reacties (17)
Categorie: Other, Views: 7.580

Ik kom thuis en vind een pamflet in de bus. Ik weet niet in welke oplage het verspreid is, maar hopelijk niet heel de stad (+/- 1 400 000 inwoners). Het is een print-out van een blog... van iemand met geestelijke problemen denk ik: Indignons Nous Tous. Die blogpost is Franstalig, dus behoorlijk wat Tweakerts zullen het niet willen of kunnen lezen. Daarom: een vertaling van deze fantastische samenzwering.

Lees verder »

Get a hostname from an IP address

By YellowOnline on Wednesday 23 November 2011 14:14 - Comments (17)
Category: Powershell, Views: 6.649

Dumping some code that might be useful for someone else. Because NSLOOKUP doesn't work in our environment - don't ask me why - I had to invent another solution to get the hostname from a given IP address. As usual, I turned my eyes to Powershell.

Read more »

Scripting the Windows Search Service in W7 and W2K8R2

By YellowOnline on Wednesday 9 November 2011 16:54 - Comments (6)
Category: Powershell, Views: 8.932

This post is valid for Windows 7 and Windows 2008 R2

Today I had to alter my Setup-Server script to enable the Windows Search Service feature after setup and to make it index the E: drive where the user's home folder resides. This turned out to be more difficult than expected. A simple how-to to help out other administrators.

Read more »

Powershell, Excel and Internationalisation

By YellowOnline on Friday 30 September 2011 10:05 - Comments (2)
Category: Powershell, Views: 6.739

Whenever I need to create a report on something, I obviously do it through Powershell. But how do you return the data to someone else?

One way would be to give the script to that person and write the values to the shell. Of course, this means that the script needs to run every time someone wants to see the data - although your data will always be up to date, this is not a great way of reporting.
Another way would be to write the output to a text file or, neater, a comma separated values (CSV) file. The data can now be transferred easily, and in the case of a CSV it can even be opened in a spreadsheet so columns keep being columns!

CSV files don't satisfy me though, if only because a CSV is not per se comma separated: when creating a CSV, the separator is defined by the system locale delimiter. In Belgium, for example, a CSV would be semi-colon separated.
This wouldn't be a problem for CSVs created and read on the same machine, but in real life you usually pass the information to someone else on a different machine with perhaps different regional settings. The result will be that the CSV file will not be read properly by whatever program is configured to be the default CSV reader and data transformations - too difficult for the average end-user and surely for managers - are necessary.

I just write all of my output to Excel sheets and make them look fancy, with colours, lines, frozen panes and all the other bling-bling that makes managers go wild. This blogpost explains the how.

Read more »

Enumerating NTFS and share permissions

By YellowOnline on Tuesday 27 September 2011 14:38 - Comments (3)
Category: Powershell, Views: 7.546

I needed to enumerate NTFS and Share permissions from different sources. The following code might be helpful for other Admins. Use it as a function or as a cmdlet; works with shares, admin shares and local paths.

Read more »