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: automation, File, File rename, Powershell, Rename, Script, Scripting, Windows
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: automation, clean, disk full, disk running out of space, disk space, Event, Powershell, SCOM, Script, Scripting, System Center Configuration Manager, temp, temporary, temporary files
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: automation, PowerCLI, Powershell, report, Script, Scripting, storage vmotion, svmotion, vmotion, VMware
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: channel9, ICT, jump start, jumpstart, Microsoft, Microsoft Virtual Academy, MVA, Powershell, PowerShell 3, Powershell 3.0, server 2012 r2, system center 2012 r2, teched, teched north america 2013, windows 2012 r2, Windows PowerShell, Windows Server 2012 R2
Future events
Before starting with my summary of 2nd DuPSUG meeting, I want to inform you about some future events first:
- Dutch PowerShell User Group Meetings
- To keep track of news, use the links to LinkedIn, Facebook, Twitter and the RSS feed on the DUPSUG website.
- In the future, the plan is to meet every June and November.
- The next meeting will probably be at November 7th at VX Company.
- The idea is that community members will also present their own experiences, use cases, scripts, tools, methods. If you want to do so, please contact the DUPSUG group.
- Remko Weijnen | Blog | Twitter | LinkedIn might be one of the people presenting at a future DUPSUG meeting.
- Jeff Wouters might be able to arrange one or more copies of the PowerShell Deep Dives book from Manning since he’s contributing to it. The book isn’t complete and released yet, but Manning has an Early Access Program which means that you will get access to the completed chapters now and will get the full version when it’s done. Until June 13 there’s even a promotion to get a 40%-50% discount and it also applies to other great PowerShell books.
- Inter Access Microsoft Summer Summit (Hilversum, July 2nd 2013 17:30-22:00 CET)
This event
Last Thursday I attended the second Dutch Powershell User Group meeting in Hilversum hosted at Inter Access and sponsored by Sapien Technologies Inc.
Just like I mentioned in the summary of the first meeting there were manu interesting sessions that provided me with more insight and inspired me for practical uses. It was also great to discuss current developments with other knowledgeable and passionate people. The main differences with the previous meeting was that:
- This meeting was completely in Dutch, while the previous one was completely in English. As such, the workshop descriptions were also in Dutch and you needed to bring your own laptop.
- The format of this meeting was more of a workshop, while the previous one was mainly presentations.
Thanks go out to all attendees, especially those presenting, organizing and sponsoring the event. Special thanks to Daniel Bot for helping me fix a (stupid mistake in a) script I was working on 🙂
Goodies and giveaways
Workshops / presentations
And now on with the really interesting stuff, the sessions/workshops. Below are the sessions with some info about the speakers and their sessions. I also added notes I took and other information I looked up afterwards. If you come across any errors or have comments, please leave a reply so I can fix it.
Read the rest of this entry »
Tags: $PSBoundParameters, -asjob, -passthru, Azure, background jobs, Cloud, Compliance Settings, DCM, Desired Configuration Management, Desired State Configuration, devops, DHCP, DHCP failover, DNS, DSC, DuPSUG, Dutch PowerShell User Group, error handling, Event, Exe, Filters, flickr, forms, Functions, graphical user interface, gui, GUI applications, high availability, Hilversum, HTA, HTML Application, Integrated Scripting Environment, Inter Access Microsoft Summer Summit, InterAccess, InterAccess Microsoft Summer Summit, Interface Video Training, IPv4, ISE, Jaap Brasser, Jeff Wouters, job, jobs, Manning, module, msi, nslookup, Out-Gridview, parallel, parallelization, passthrough, Ping, PowerGUI, Powershell, PowerShell 3, Powershell 3.0, PowerShell 4.0, PowerShell Deep Dives, PowerShell GUI, PowerShell GUI applications, PowerShell Runspace, PowerShell RunSpaces, Powershell v3, PowerShell Workflow, presentation, PS2Exe, Resolve-DNSName, Richard Siddaway, runspace, runspaces, SCCM, script block, script blocks, scriptblock, scriptblocks, ShowUI, splat, splatting, System Center Configruation Manager, Test-Connection, The MSI Wizard, VisualStudio, VX Company, Windows, Windows 2012, Windows 2012 Server, Windows 8.1, Windows Forms, Windows Presentation Foundation, Windows Server 2012, Windows Server 2012 R2, WinForms, workflow, workshop, WPF
The PowerShell Summit took place in North America in April and many of the prominent PowerShell people were there. And from what I read there were a lot of great presentations.
The PowerShell Summit 2013 North America conference schedule can be found here. Thanks to Don Jones and PowerShell.org (most of) these sessions are available for download: http://powershell.org/wp/2013/04/22/summit-downloads/
Videos are available here:
http://powershell.org/wp/2013/05/07/powershell-summit-videos/
So even if you weren’t able to attend, you can still learn from their presentations. Or if you did attend, you can review them again.
Tags: conference, conference schedule, Don Jones, download, downloads, North America, Powershell, PowerShell Summit, PowerShell Summit 2013, PowerShell Summit 2013 North America, PowerShell.org, schedule, session, sessions
About 6-7 years ago at school we were taught how to script using VBscript. I was really bad at it though and never really made an effort to change that. When PowerShell became more popular however I had gained some working experience and was also pleasantly surprised by the simplicity of it.
I started learning about PowerShell scripting by googling and using script examples. Disadvantages of this approach however is that:
- You can pick up bad habits from others (without realizing it).
- You sometimes don’t know exactly why you’re doing things a specific way.
- You sometimes don’t know why some things are/aren’t working.
PowerShell is getting increasingly important though:
- Even though more companies are offshoring and employees are relatively, it is still cheaper to automate instead.
- Cost isn’t the only issue, speed is important as well. Scripting allows you to get things done more quickly.
- PowerShell is increasingly being adopted by more companies, products and (cloud) services.
- The number of available built-in cmdlets are increasing, which makes it even easier to automate actions.
- For many products you have to use PowerShell to make specific settings, because only the more basic settings are available in a Graphical User Interface (GUI).
- Changes can be applied consistently in a development, test, acceptance, pre-production, production environment.
- Less chance of human error.
- If done correctly, you’ll also have included a way to quickly revert the changes by script.
To make sure I didn’t miss out on too many things, I decided to start with a book that teaches the basics. Because of the good reputation of the authors Don Jones and Jefferey D. Hicks in the PowerShell community, I decided to go for their book “Learn Windows PowerShell 3 in a month of lunches, second edition” published by Manning Publications Co.
The book’s purposely didn’t try to stuff all PowerShell related information into the book. Instead it provided the reader/student with the basics needed to be able to find/discover this information themselves if needed. I personally like this approach, because otherwise there would be too much information to take in which might be demotivating and distracting.
I also liked the practical examples of common mistakes made by people who are new to PowerShell. There were a lot of examples I ran into as well when I started using PowerShell and I think this will prevent people from becoming frustrated because they understand why things aren’t working the way they might have expected.
All in all this is a great book to start learning PowerShell. This is however just the start and you should expect to continue using other resources/books to further your knowledge. The book also provides links to useful resources as well. And most importantly … start using PowerShell more so you will learn by experience.
Personally I still have these books lying around, but haven’t decided yet which one to start with next:
I’m also still considering taking a PowerShell course, but I’m a bit hesitant about the added value because it’s hard to determine the quality of a course by the description.
If you have experiences or suggestions, please let me know.
Tags: automate, automation, Don Jones, Jefferey D. Hicks, learn, Learn PowerShell toolmaking in a month of lunches, offshore, Powershell, Scripting, Windows PowerShell
I run Winaudit on each server/system and save it to a central location named <computername>.csv This way I have access to a lot of information about each system. If you need a specific subset of information for each system however, you don’t want to have to open each file manually to get this information.
This script will parse each <computername>.csv to extract specifc information and save it to one new file containing this info for all parsed separate files.
Tags: Audit, automate, automation, csv, Microsoft, Parse, Powershell, Script, system, System Info, System information, WinAudit