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.

 

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

VMware – PowerShell script to get (storage)vmotion history

Even though I’ve always liked VMWare vSphere, I thought the events and informational messages weren’t always as helpful as they could be.

One of the common things I want to know are the vmotions and storage vmotions that have taken place. Luc Dekens has created a great script that shows the (s)vmotions that have taken place including details about them.

Be sure to take a look at his website for the PowerShell / PowerCLI script including a detailed explanation:
http://www.lucd.info/2013/03/31/get-the-vmotionsvmotion-history/

 
 

Tags: , , , , , , , , ,

PowerShell – Getting Started with PowerShell 3.0 JumpStart July 18

I’m a big fan of the Microsoft Virtual Academy JumpStarts. Recently a PowerShell JumpStart has been announced as well that will be hosted by Jeffrey Snover and Jason Helmick. For more information and to register for July 18, take a look at : http://www.microsoftvirtualacademy.com/liveevents/PowerShell-JumpStart. Apparently it’s even a 2 part series.

Also if you won’t be able to join the JumpStart live, the sessions will be recorded so you can view them whenever it suits you.

For those who missed it, this month there will also be JumpStart sessions for For Windows Server 2012 R2 and System Center 2012 R2. For more information and registration take a look at this blog post.

Hope to see you there.

 

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

Windows 8 – My view on the re-added start button in Win 8.1 and 2012 R2

As you may have read already, with Windows 8.1 Preview (and Windows Server 2012 R2 Preview) the start button has been re-added:

win8.1_start

Basically by left clicking you will switch between the modern/metro interface and the desktop (similar to pressing the windows key). By right clicking you will get the menu shown in the image above (similar to pressing windows key + X). For more information and tweaks take a look at:
http://www.thewindowsclub.com/shutdown-restart-sleep-hibernate-windows-8-1

Another often requested feature was to be able to bypass the metro/modern interface start screen. This boot to desktop is now also possible: http://www.thewindowsclub.com/boot-to-desktop-windows-8-1

A lot of people have been complaining and discussing the absence of the start button and the start menu and that the shutdown/restart options where too hard to access.

Personally I simply press CTRL+ ALT + DELETE, click the power icon and choose the action to perform. Or I press the physical power button on my laptop, pc or tablet.

I also don’t really need the start button/start menu. I added my most used apps on the modern/metro start screen and/or added them to my desktop and taskbar. Other apps  I simply search for by starting to type on the modern/metro start screen.

The lack of a start button does irritate a lot when you’re accessing Windows 8/2012 through RDP or any other remote method. Trying to access the hot corners to switch between the metro/modern start screen and the desktop can sometimes be hard, especially on laggy connections (ILO/RSA/DRAC). The same is true for accessing the charms bar (which you use to restart/shutdown).

The re-added start button does solve the switching between the metro/metro start screen and the desktop I described above,but the charms bar is still an issue. You can use the start button for restart/shutdown though.

What I hate most though, is that the start button is simply a button. It doesn’t include the start menu people want to access their programs and settings in a way to are accustomed to. To make it even worse the re-added official start button makes it harder to use some 3rd party start button/menu replacements that were working well (but this will probably be sorted out soon since 8.1 has only been released a couple of days). Classic shell still works well though: http://www.classicshell.net/

Even though I think Microsoft has been doing a lot of great things lately, the way they’re handling the start button/start menu isn’t one of them in my opinion. People want the start button and the start menu they’ve grown used to and that has been available for many Windows versions. This start button without the start menu will probably lead to more disappointed users because they expect the start menu to be included with the start button. I think this will also hurt adoption in the enterprise. All in all I think it’s a missed oportunity

The preview version with this start button is not the final version. While I don’t expect Microsoft to re-add the start menu before the finl release, I sure hope they prove me wrong. If you want to have the start menu back, be sure to voice your opinion. This did work for the Xbox one, where Microsoft changed course with regards to Digital Rights Management (DRM).

Even though the start button isn’t what many people have hoped for, there are a lot of other great improvements to Windows 8.1 and Server 2012 R2 though. I’ll try to post more about it in the next couple of weeks.

 
1 Comment

Posted by on July 1, 2013 in ICT, Microsoft, Windows, Windows 2012, Windows 8

 

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

 
%d bloggers like this: