How can I get the membership rules on all collections in a folder (Powershell)?

A few weeks back I was tasked with the enormous task of checking that all device-collections that were associated with an application were linked to a group in the Active Directory and that direct membership wasn’t used. If this had been on a, let us say, ten collections it would have been done in about 20 minutes,  but in this case it was over 100 collections… Going the long way of right clicking, choosing “Properties”, waiting a few seconds and the select the correct tab wasn’t an option, so PowerShell to the rescue!!

Continue reading

Posted in Powershell, SCCM | Tagged , , , , , , | 4 Comments

Hyper-V, Server 2012 R2 – Cannot find the Microsoft License Terms

Today I needed to install a Server 2012 R2 for testing WSUS configurations, and since my current laptop doesn’t rank among the top 10 models when looking at RAM, I thought that 512 MB was enough for the purpose. Sure, I’ll grow gray hair before it’s done installing, but that’s another story.

Continue reading

Posted in Hyper-V, Server 2012 R2 | Tagged , , , | Leave a comment

Deploy and configure Office 2013 Click to Run (SCCM 2012)

In this post I will show you how to configure Office 2013 click to run and how to deploy it to your clients using SCCM 2012.

Using Office click to run has many advantages, but if your internet connection is slow or unreliable, it can result in total catastrophe for your users. Today, with the high speed connections that we have both with cable and over 4G, this should not be a problem, but still it’s something to think about. Continue reading

Posted in Office, SCCM | Tagged , , , , , , , | Leave a comment

OSD: Failed to get client identity (80004005)

Recently I came across this error in a smsts.log where I work. OSD had been working fine until a few weeks back when it suddenly for no reason started to fail. Right after entering WinPE you get the message; “An error occurred while retrieving policy for this computer (0x80004005). For more information, please contact your system administrator or helpdesk operator”  Continue reading

Posted in SCCM | Tagged , , , , , , , | Leave a comment

How can I list all available modules in PowerShell?

This is a quick post based on a question I got today. A friend wondered which PowerShell modules were available by standard in Windows 8.1.

To get the complete list of all modules that are available on your system, simply run the following line:
“Get-Module -ListAvailable”

In the console, all modules will be listed together with the cmdlts that will be available.

If you, for some reason, want to import all modules available, simply pipe the above to “Import-Module”. The line would then be:

Get-Module -ListAvailable | Import-Module

Click here for more guides

Posted in Powershell | Tagged , , , , | 1 Comment

Create and use a PowerShell console file

When writing scripts, sooner or later you will realize that you add the same snap ins all over again in different scripts.

What you can do in this case is to export all loaded PowerShell snap ins from a console to a file that can be loaded when starting PowerShell. This way, your scripts doesn’t need to have 10 lines where you load them in all your scripts.

One thing I’ve noticed, is that some snap ins can’t be loaded in the script if the script is to be run in a scheduled task. In my case it was the snap in for Exchange 2013, if the snap in was loaded in the script, an exception was thrown, but as soon as I created the console file with the snap in loaded, it worked the way it was superposed to! Continue reading

Posted in Powershell | Tagged , , , , , | 2 Comments

Read XML-file in PowerShell

Today I will show you how to read a XML-file, something with endless possibilities. An example is if you have a file that contains information about users and you need to create new accounts in the Active Directory. Continue reading

Posted in Powershell | Tagged , , | Leave a comment

Query SQL database from PowerShell

I’ve been working on a larger script where I needed to query a database to see if a value was present or not, something I thought was pretty much straight forward.

However, this turned out to be a bit harder than I thought it would be, but when I thought it through once again, it turned out to be almost as simple as I thought it would be.  Continue reading

Posted in Powershell | Tagged , , , , , , | 1 Comment

Install SQL Server PowerShell Module (SQLPS)

When installing SQL server, the PowerShell modules are installed by default, but if you wan’t to run scripts or commands from a computer/server that hasn’t got an installation of SQL, you need to install these manually. Continue reading

Posted in Powershell | Tagged , , , , , | 5 Comments

Deploying the App-V 5.0 Client Using Configuration Manager 2012

Integrating App/V 5.0 with SCCM has many advantages, one of the bigger being able to remove one server from your environment and another is to keep better track of your applications. All of sudden, you are no longer required to keep track of and manage two different systems. In this guide I will show you what is needed to deploy the App/V client to your computers, preparing them for running applications. Continue reading

Posted in App-V | Tagged , , , , , , , | 3 Comments