RSS

Monthly Archives: July 2013

PowerShell – Reverse strings and reverse file names

With PowerShell it is relatively easy to reverse a string:
$str = “gnirtsdesrever”
$str[-1..-($str.length)] -join “”

Some of you might ask: Why would anyone want to do this ? Well, since the start of the year Usenet DMCA takedowns have begun to occur automatically, very quickly and very often. This means many movies and TV series on Usenet / News Groups are being taken offline very quickly.

Counter measures to prevent takedowns by uploaders include:

  • The use of encrypted links to NZB files.
  • The use file names that make it harder to find copyrighted files.

As you can probably guess, some just reverse the file names. The PowerShell script I’ve created will automate reversing the file names for files in the specified folder that match the specified file name filter.

I hope it is useful for you as well.

PS: Someone else on usenet had the same idea as me and created a VBS that will add a right-click menu option to explorer. I’ve added this in the same location as my PowerShell script as well.

Advertisements
 

Tags: , , , , , , ,

PowerShell – Cleaning folders containing temporary files

At the companies I’ve worked for , disk space on the system disk ran out on a regular basis for some systems and caused a lot of monitor calls. These kind of boring repetitive tasks are always the ones you want to automate.

So when I came across the great blog post “Weekend Scripter: Use PowerShell to Clean Out Temp Folders” on the “Hey, Scripting Guy! Blog”, I wanted to post it on my own blog as well. The blog post also describes the process of creating the script very well, which is very convenient for those who are relatively new to PowerShell to scripting and want to learn how to do it better.

If you want to take it even a step further, you could automate it even more. By example by automatically running the clean script when an event is generated that the disk is running out of space. You can configure this using by example:

Or you could use PowerShell remoting to do it on many systems at the same time. This could come in handy by example when after WSUS patching the content in “C:\Windows\SoftwareDistribution\Download” is not deleted automatically.

 

Tags: , , , , , , , , , , , , ,

Personal Development – self improvement books

Like many other people I’m continuously looking to improve. For me this includes, but is not limited to:

  • My technical skills as an ICT professional.
  • The balance between work and personal life.
  • Health and happiness.
  • Soft skills.

The last three categories are purposely very broad. Because of this, there are many books available that can help you improve. The books I’ve read or plan to read can be found on my website http://bjornhouben-web.sharepoint.com/Lists/Books. I hope it might inspire you to read some of them.

PS: Besides the books, there are also great online resources you might want to look into. I personally really like Seth Godin’s blog.

Should you know of any other great resources, please leave a comment.

 
 

Tags: , , , , , , , , , , , , , , ,

PowerShell – Manage printers

At work a colleague of mine was looking to modify printer permissions on a Server 2008 R2 terminal server using PowerShell. And to be honest, it was more difficult to do than I had expected.

So naturally, I started looking if someone had already created a script for this same purpose and eventually I found this great script created by Vadims Podans:
PrinterUtils.ps1 / Functions for advanced printer management

By leveraging this script, permissions were easily modified by adding the following lines:
$name = “Printername”
Get-Printer “localhost” $name | Add-PrinterPermission “corp\Domain Users” 0 “print”
Get-Printer “localhost” $name | Remove-PrinterPermission “everyone”
Get-Printer “localhost” $name

My modified script can be found here: http://bjornhouben-web.sharepoint.com/Lists/Scripts/DispForm.aspx?ID=22

Be sure to check Vadims Podans website for other great resources: http://en-us.sysadmins.lv/

 

Tags: , , ,

Excel – Determine monthly payments for weekly activity with variable number of participants

For some time now, I’ve been playing indoor soccer with friends and colleagues on a weekly basis. To do so, we rent a location and split the costs. Because the people and the number of people vary, it is tedious work to keep track of who needs to pay how much. Especially because not everyone can/will pay at the same time.

Since I’m lazy, I’ve created an Excel spreadsheet to help with that:
http://bjornhouben-web.sharepoint.com/Lists/Files/DispForm.aspx?ID=18

Here’s what it looks like (click for full image):

It is easily customizable, so I hope it is useful to you as well.

 
Leave a comment

Posted by on July 8, 2013 in Excel, ICT, Microsoft, Office, Office 2013

 

Tags: , , , , , ,

TechNet subscriptions will be retired without a proper alternative. Sign the petition !

As you might have already read by now, TechNet subscriptions are going to disappear. For more info take a look at this blog post and the Subscriptions retirement FAQ.

The most important stuff:

  • TechNet Subscription are sold through the TechNet Subscriptions website until August 31, 2013.
  • Subscribers may activate purchased subscriptions through September 30, 2013.
  • The TechNet benefits portal and the subscriber downloads page will remain available for non-Volume Licensing subscribers through September 30, 2014.
  • Alternatives mentioned by Microsoft are:
    • MSDN subscriptions
    • Windows Azure.
    • Technet Evaluations (time limited).
    • Technet Virtual Labs.

I personally think this is not a good way to go because the TechNet software is used by many people to increase their skills (often even for a large part in their own time). Because of this, Microsoft products can add even more valuable for companies. Making it harder to get the required software and to keep it running for a longer time will probably scare people away or it will steer them towards hacked/cracked versions.

Basically if you want to have access to non time limited versions of enterprise products of Exchange, Lync, Sharepoint, System Center, etc. you need to take a $6000+ MSDN subscription. Currently I’m paying for TechNet Pro myself which costs 375 euro and I will take a Technet Subscription for this last year. I hope that Microsoft will have come to its senses by then and has provided a proper alternative. For now I would like to ask everyone that feels the same to sign the petition to get a decent TechNet alternative.

 
3 Comments

Posted by on July 5, 2013 in Uncategorized

 

Tags: , , , , , ,

Windows 8.1 – Use windows store apps when behind an authenticated proxy

With Windows 8 one of the major issues especially when used in an enterprise was that the Windows Store and Windows Store apps wouldn’t work when you were behind an authenticated proxy unless you specifically allowed URLs to pass through the proxy unauthenticated.

I even created a blog post about this before and since it gets many views I believe it is an issue a lot of people are having.

As such I’m happy to inform you that with Windows 8.1 Preview you can configure your authenticated proxy to be used for Windows Store apps. Press Windows key + W and type “Change proxy settings”.

Win8.1_proxy

The settings from Internet Explorer are also automatically used, so existing configurations set using a GPO work as well.

 
7 Comments

Posted by on July 4, 2013 in ICT, Microsoft, Windows, Windows 8

 

Tags: , , , , , , , , , , , , , , , , , , , ,

 
%d bloggers like this: