PowerShell + Working with applications–custom view

Programs and features will not give you much information about an application.

image

But if we take my post from yesterday and modify it then we can get this.

image

It’s just a oneliner:
Get-WmiObject win32_product | Select-Object -Property Name, Vendor, Version, IdentifyingNumber | sort -Property Name

And if you want to know what more properties you can find about all installed applications you can do like this:
Get-WmiObject win32_product | Select-Object -Property *

The properties URLInfoAbout, URLUpdateInfo and HelpLink can be nice to have too…

Posted in Deployment, PowerShell | Tagged , , | 2 Comments

PowerShell + working with applications–Find Identifying Number

Often when working with applications you need the Identifying Number to identify the application for uninstalling/installing etc

For example, I want to uninstall Safari on machines using MsiExec.exe /X and to use with a logon script or to use with sccm or similar to automate an uninstallation.

On one of my computer I have Safari installed. If we look in Programs and features we will not get the Identifying number.

image 

The way lots of people will do is to look in the registry and under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
or
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\

The problem is that in most of the cases you need to look in lots of registry keys to find the right one.

image

Another and an easy way is to just open up PowerShell and write:

$myApp = “Safari”
$app = Get-WmiObject win32_product | Where-Object {$_.name -match $myApp}
$app.IdentifyingNumber

The output will give us “{C779648B-410E-4BBA-B75B-5815BCEFE71D}”

Posted in Deployment | Tagged , | 3 Comments

MDT 2012 Update 1 update

There is a new version out of the MDT 2012 Update 1, 6.1.2373.0
http://www.microsoft.com/en-us/download/details.aspx?id=25175

This version has some bug fixes regarding ConfigMgr 2012 and MDT 2012.

More info can be found here,
http://blogs.technet.com/b/mniehaus/archive/2012/09/19/mdt-2012-update-1-has-been-updated.aspx

Posted in Deployment | Tagged , | 1 Comment

Lots of new stuff

Microsoft have been working on lots of new stuff. And now It’s time to release it.

  • Windows 8 will be available on…
    …October 26th, 2012!

    Out in the market

  • But It will RTM earlier:

    However, we have a number of programs that provides various audiences early access to the Windows 8 RTM code to help prepare for Windows 8 as it enters the marketplace this fall:

    • August 15th: Developers will be able to download the final version of Windows 8 via your MSDN subscriptions.
    • August 15th: IT professionals testing Windows 8 in organizations will be able to access the final version of Windows 8 through your TechNet subscriptions.
    • August 16th: Customers with existing Microsoft Software Assurance for Windows will be able to download Windows 8 Enterprise edition through the Volume License Service Center (VLSC), allowing you to test, pilot and begin adopting Windows 8 Enterprise within your organization.
    • August 16th: Microsoft Partner Network members will have access to Windows 8.
    • August 20th: Microsoft Action Pack Providers (MAPS) receive access to Windows 8.
    • September 1st: Volume License customers without Software Assurance will be able to purchase Windows 8 through Microsoft Volume License Resellers.

More information can be found here.

Posted in News | Tagged , , , , | 3 Comments

Cool PowerShell stuff in the summer part 2

Print a test page to the default printer is not a very nice thing to be able to do.

But this little WMI printer oneliner is little more work related and can be used to change the default printer of a user.

(Get-WmiObject -Class Win32_printer -Filter “Name=’Microsoft XPS Document Writer’”).SetDefaultPrinter()

Posted in Uncategorized | 1 Comment

Cool PowerShell stuff in the summer

I’m currently working on lots of PowerShell stuff after an half of year at a customer.

And I want to share some nice stuff to you.

Some stuff will be nice to have and some stuff will not be.
But maybe It will be an opener for something better.

First out is a WMI, Print a test page to your Default Printer.

(Get-WmiObject -Class Win32_printer -Filter “Default = ‘True’”).PrintTestPage()

You need to run PowerShell as an Administrator to be able to do this…

It’s a simple oneliner.

Have a nice summer and have a great PowerShell time!

Posted in PowerShell | Tagged , , | 2 Comments

New PowerShell User Group

untitled

We are currently building up a Swedish PowerShell User Group.
Powershell User Group Sweden

The Scandinavian PowerShell user group has been down for some time and It was time to get a Swedish one instead.

[In Swedish]

Vi håller på att bygga upp en Svensk PowerShell användargrupp, PowerShell User Group Sweden.

Just nu finns vi på Facebook. Välkommen att göra oss sällskap  om du är intresserad av PowerShell.

Posted in Uncategorized | 6 Comments

The Windows 8 server beta

Windows 8 server beta was released from Microsoft yesterday.
http://www.microsoft.com/en-us/server-cloud/windows-server/v8-default.aspx

I have installed It in my first test environment on my laptop.

And as It was with previous The Windows 8 developer preview, VMWare Workstation
does not like Windows 8 if you don’t have the latest version of it.

So I run the test on Oracle VM VirtualBox.

Preview pictures of Windows 8 server from my laptop.

Capture01Capture02Capture03Capture04Capture05Capture06Capture07Capture08

I personally likes the PowerShell icon that is pinned from the start Ler 

image

More blog posts will come later about  deployment and powershell with Windows 8 server beta.

Posted in Uncategorized | Tagged , , , | 4 Comments

Get-SNames

Groups-Meeting-Light-icon

This is the updated version of my old LName function.

I changed the name to Get-SNames instead of Get-LNames because of
that I know that the correct name is not Last Name and It should be Surname instead.

I use It in my create AD lab script and in a couple of other scripts when I
need “real” peoples name.

My thought have been to update It so that I can use names from other countries
as well.

So I came up with an updated version of the function that can create
a list from USA and It can also create a list from Sweden, as It could
before.

snamessweden
The Swedish list is taken from The Gothenburg University

snamesusa
The US list is taken from mongabay.com’s name site

I have done some changes to the Swedish list as well.
The list is now sorted and saved as UTF-8. The UTF-8 part is for viewing and using names that contains Swedish letters å ä and ö.

The function can be downloaded from here.

Posted in PowerShell | Tagged , , | 2 Comments

Get-FNames

Groups-Meeting-Light-icon

Back in 2009 I wrote a Function that took peoples first names from a source in Sweden.
It was top 1000 names here in Sweden.

I use It in my create AD lab script and in a couple of other scripts when I need “real” peoples name.

My thought have been to update It so that I can use names from other countries as well.
So I came up with an updated version of the function that can create a list from USA and It can also create a list from Sweden, as I could before.

image
The names from USA comes from Social Security Online.

image
The Swedish names come from the Gothenburg University.

notfnamesswe notfnamesusa

When you run the function you need to have internet access!

The function can be downloaded from here.

Posted in PowerShell | Tagged , , | 3 Comments