RSS

Tag Archives: Powershell

SCOM2012 – Extract English Only MSP Update Rollup 3 files from CAB using PowerShell (and my vision on updating using WSUS/Microsoft Update)

I created this script to automate extracting English only MSP files from CAB files in the SCOM 2012 Update Rollup 3 (UR3) files. By default it will delete extracted non-English versions. With some minor modifications it can be used for any CAB file though, not just SCOM 2012 Update Rollup 3. It includes a lot of comments, so it is manageable and can be used for getting to know PowerShell better.

SCOM 2012 Update Rollup 3 can be downloaded here : http://catalog.update.microsoft.com/v7/site/search.aspx?q=2750631

The issue with SCOM 2012 Update Rollup 3 is that after downloading you’ll end up with a total of 41 CAB files. The large number of files is because they are for different components and in multiple languages. And what is even worse, is that the file names do not show which file is for which language.This script will extract all cab files to a subfolder and will then removes the non English ones. Below are some of the example files in Update Rollup 3 to give you an idea about the nondescriptive file names:

  • all-kb2750631-amd64-console_1af57997fba722cdd3dfe4b2ddb4b8d8d829dd6f.cab
  • all-kb2750631-amd64-console_3d61c9e090622b2b59ee8bf7b13b922e815bdf15.cab
  • all-kb2750631-amd64-console_494a77ddaa09206f8f61ecdfb2edfcd1e82a497c.cab
  • all-kb2750631-amd64-console_69bb307dbd450cfd8b732c2ac3845c9870bdc6d0.cab
  • all-kb2750631-amd64-console_71c65fc2ded6769edbf610958780b5a8ac374f8c.cab

Deploying SCOM 2012 components and updates to them can be done in multiple ways:                 http://technet.microsoft.com/en-us/library/hh551142.aspx

Most of the work while updating will probably be updating the agents. Basically for SCOM 2012 there are 2 major ways to install agents:

  1. Push installation (initiated from SCOM 2012). Updates can then also be deployed from within SCOM (Remotely Manageable = Yes). Push installation is often preferred, because it is easy and also allows you to push updates to clients from within SCOM 2012. The downside however is that it also requires a lot of open ports (including RPC) which might not always be acceptable:                    http://support.microsoft.com/kb/2566152. Push install and update install can also consume a lot of bandwidth and depending on your architecture (b.e. WAN links), the push install might not be the best way.
  2. A manual installation (anything that is not a push installation). Updates cannot be deployed from within SCOM (Remotely Manageable = No). Manual installation includes running setup manually, using a GPO software install or using deployment tools like System Center Configuration Manager). Using the GUI, you cannot simply set an agent back to remotely manageable = Yes. You can change this in SQL though, but keep in mind that connectivity  requirements still need to be met.

With Update Rollup 3, it is now possible to leverage WSUS / Microsoft Update to deploy updates (not the inital agent) to all SCOM 2012 components. I predict this will probably become the preferred way of updating SCOM 2012 for most companies:
+ It does not require many ports on your firewall to be opened.
+ Better bandwidth management (local WSUS, BranchCache, BITS).
+ Auto detects components on systems (component updates are not forgotten).
+ Still in control of when which updates are deployed/approved.
+ Leverage existing patch/update management procedures and systems WSUS/SCCM (standardization).
– Initial agent installation cannot be performed using WSUS.

PS: Also check these great blog posts when deploying Update Rollup 3:

 

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

Windows 8 – Beware of the differences between shut down (fast startup) and restart

As some of you might know Windows 8 has a new feature called Windows 8 fast startup. As the name implies, this allows for a faster startup.

Basically when you use shutdown in Windows 8, the system is never completely shutdown. It basically closes the user sessions and hibernates the kernel session (instead of closing it as with Windows 7). When you us restart in Windows 8, the kernel session will be closed.

It is important to realize this, because some changes to your systems might require a reboot to become active. Even though in the past it was also ok to shut down the system and then start the system again, with Windows 8 you really need to perform a restart.

To manage the Fast Startup feature, check this blog post. Here’s another great blog post that discusses the Fast Startup feature in more detail and also covers Fast Startup in relation to shutdown.exe and PowerShell.

 
Leave a comment

Posted by on December 5, 2012 in ICT, Microsoft, Windows, Windows 8

 

Tags: , , , , , , , , ,

Summary of 1st Dutch PowerShell User Group (DuPSUG) meeting

General

Last Friday I attended the first Dutch Powershell User Group meeting in Eindhoven at Master IT Training and it was great. There were a lot of knowledgeable and passionate people and the interactive sessions were great as well. Thanks go out to all attendees, but especially to the ones presenting and organizing the event.

The fact that we were asked to leave the building (because it was getting pretty late and they wanted to lock up), also stresses the passion of all attendees because. If this wasn’t the case we probably would’ve stayed a lot longer.

Be sure to check out the Dutch PowerShell User Group (DuPSUG) website and Twitter on a regular basis for articles and future events. Ed Wilson also wrote a post of the meeting on the “Hey, Scripting Guy! Blog”.

Photos

Ed Wilson "The Scripting Guy" At Dutch PowerShell User Group DuPSUG
Original photo on flickr

Sessions

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

Windows 8 – Windows store app installation fails on Windows 8 with error code 0x80070057

Last week I encountered error code 0x80070057 while trying to install an update to the “Fruit Ninja” windows store app.

The steps below were used to fix this error:

  1. Run powershell as administrator
  2. get-appxpackage -name *fruitninja* | remove-appxpackage
  3. Run “wsreset”
  4. Go to store page and click install

Thanks to this post that helped me resolve the issue:
http://www.pocketables.com/2012/10/how-to-fix-fruit-ninja-or-any-other-broken-app-on-windows-8.html

PS: I had already tried syncing the app licenses, but this didn’t resolve the issue.

 

Tags: , , , , , , , ,

Review of yesterday’s free “IT Camp Windows Server 2012” event

Today I attended the free “IT Camps Windows Server 2012” event in Eindhoven at Master-it in Eindhoven and I really liked it. It was a real hands-on IT Camp in which they tell you some interesting things about Server 2012, while you are also able to immediately use the technologies you learn about. Ofcourse it’s also a great work to get to know new interesting people.

They also used feedback from previous IT Camps very well. This was very noticeable because now everyone was able to join the hands-on labs. Because of better preparations there was also still plenty of time to explore all assignments and go into more details.

Many thanks to Tony Krijnen and Daniel van Soest from Microsoft for this great event.

There are still IT Camp events planned, but I don’t know if you can still register for them. Check the link below for more information about the event contents, dates and locations:
http://www.microsoft.com/netherlands/evenementen/event.aspx?eventid=675&date=20121016&eventtype=TechNet#locations

 

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

1st Dutch PowerShell User Group (DuPSUG) meeting on November 23rd

At November 23rd the 1st Dutch Powershell User Group (DuPSUG) meeting will be held in November at Master IT in Eindhoven for free.

Sessions:

  • Using Windows PowerShell 3.0 to manage the remote Windows 8 workstation
    Ed Wilson (Microsoft Scripting Guy)
  • PowerShell and WMI
    Richard Siddaway (PowerShell MVP)
  • What’s new in PowerShell 3.0
    Bert Wolters (Microsoft Certified Trainer with Master it Training)
  • Protect your PowerShell scripts with version control
    Stefan Stranger (Senior Premier Field Engineer at Microsoft Netherlands)
  • From command, to script, to function, to advanced function, to tool.
    Jeff Wouters (freelance Technology Specialist at Methos IT)

Read more about the meeting, the sessions and the speakers here: http://www.dupsug.com/

Also keep in mind that the available seats are very limited, so quickly sign up if your interested.

 

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

Free “IT Camp Windows Server 2012” events in The Netherlands

Since Microsoft has recently released their latest server OS calles Windows Server 2012, they’re hosting free one day “IT Camps Windows Server 2012” events.

Check the link below for more information about the event contents, dates and locations:
http://www.microsoft.com/netherlands/evenementen/event.aspx?eventid=675&date=20121016&eventtype=TechNet#locations

I’ve attended an IT camp for Hyper-V in Server 2008 R2 in the past and I liked the concept. Back then however there were some points of improvements with regards to preparation and the number of attendees that could actively participate in the hands-on labs. I have learned from this experience and will not miss out on this again.

I’m going to attend the Eindhoven event on the 16th of October, so please let me know if you’re attending this event as well so we can meet up.

PS: For participating in the hands-on labs you need to bring your own laptop that meets the requirements stated in the event description.

 

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

Easily rename downloaded movies using powershell

Context

As most people, I often complain about not having sufficient time. It also doesn’t help that I have a lot of hobbies and interests. Because of this I decided to combine my hobbies and interests in such a way it would eventually save me time.

Basically I decided to learn powershell scripting by automating the task of renaming downloaded movies. These need to be in a specific format for reliable use with the movie jukebox called Yet Another Movie Jukebox (YAMJ). As a result this will save me a lot of time in the future.

Concept for the script

The file names of most movies I download are mostly in the following format:
The.Devils.Advocate.1997.UNRATED.DC.720p.BluRay.X264-AMIABLE.mkv
<movie.name>.<movie release year>.<metadata>.<metadata>…..<last.metadata>.<file extension>

What is important for YAMJ to work correctly is basically the movie name and the year (just in case there are movies with the same name, but released in a different year). So basically my preferred output would be:
The Devils Advocate 1997.mkv

To realise this, conceptually the following will be done for all files in a specific folder:

  1. Determine the current file extension and save it to a variable.
  2. Remove all dots “.” from the file name.
  3. Determine if there is a year notation in the file name (by example 1997).
  4. If there is no year notation found, don’t do anything else (file does not meet the expected format).
  5. If the year notation is found, remove everything from the file name after the year notation and re-add the file extension.

The script itself

The script itself can be found on my sharepoint list :
http://bjornhouben-web.sharepoint.com/Lists/Scripts/

Closing thoughts

I hope this will help home users to see the advantages of scripts, use them and benefit from it. For ICT professionals I also hope that it will help them get a better understanding of Powershell. Because in my opinion Powershell is getting increasingly important both for Microsoft and non Microsoft products (by example VMware).

I’d love to get feedback about this post and hope to receive some replies.

 

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

Windows 8 – Sideloading application example (Wordfeud)

Context

One of the negative aspects of working with new technologies is that sometimes you miss some stuff that what available with older versions.

As an example, the Pinball FX2 game/app was in the store of the Windows 8 Consumer Preview, but was not available in the Windows 8 Release Preview. Another example is Wordfeud which was available in the store of the Windows 8 Release Preview, but is not (yet) in the store of the Windows 8 RTM.

[EDIT]

Apparently you can also:

  1. Go to the Windows store
  2. Toggle the AppBar by right clicking, pressing windows key + Z or swiping down from the top of the screen.
  3. Select “Your Apps” 
  4. Choose from the dropdown box: “Apps not installed on this PC”
  5. Select the apps you want to install and press the “Install” button.

[EDIT]

During my time with Wordfeud in the Windows 8 Release Preview I did however see that the developer provided the files to sideload the application. Sideloading means that you can install apps directly without going through the Windows store. More information about sideloading can be found here.

For sideloading Wordfeud, perform the following actions

  1. Run Windows Powershell as administrator
  2. Enable powershell script execution using: set-executionpolicy remotesigned
  3. Download the latest Wordfeud build from http://dl.dropbox.com/u/13365029/WordfeudMetro/index.html
  4. Extract the files to a folder by example : C:\WordfeudMetro_1.0.0.9_AnyCPU_Debug
  5. From within Windows Powershell go to the folder using: cd C:\WordfeudMetro_1.0.0.9_AnyCPU_Debug
  6. Execute the Powershell script by typing: .\Add-AppDevPackage.ps1

For removing the sideloaded Wordfeud, perform the following actions

  1. Run Windows Powershell as administrator
  2. From within Windows Powershell remove the application using: Get-AppxPackage | where PublisherId -eq csykjp4qexh44 | Remove-AppxPackage
 
Leave a comment

Posted by on August 13, 2012 in ICT, Microsoft, Windows, Windows 8

 

Tags: , , , , , , , ,