SCAPaoT

System Center, Automation, Powershell and other Thoughts

Author Archives

SCCM v.Next Beta 1 released

Microsoft announced the beta 1 of SCCM v.Next on yesterday.

With SCCM v.Next Microsoft buildes the next version of it’s systems managment and software distibution platform formaly also known as SMS.

To get more informations, read the original post here: http://blogs.technet.com/b/systemcenter/archive/2010/05/24/the-next-generation-of-client-management.aspx

(Update) SCCM vNext and Powershell

A few weeks ago,
(http://www.scapaot.de/blog/?p=57),
I have written about the question if there will be Powershell support in SCCM vNext.

On yesterday I had the chance to listen to a very interesting talk from Microsoft about the user centric software deployment and SCCM vNext.
There I had the chance to ask about the Powershell support in the next version.

The answer is:

The next version has support for the same WMI classes
as it has in SCCM 07.
And there will be new WMI classes for the new features.
Powershell support is there using WMI cmdlets.

And perhaps the SDK for vNext will have some little more infos about using the Powershell to manage SCCM.
Cmdlets are not planed at the moment.

So, for all of you want to learn how to automate SCCM,
go out and learn something about WMI.

DfsDnsConfig also under Server 2008 R2

Since DFS Namespaces are available in Windwos 2000, clients get the referrals to the linked shares with the netbios name instead of the FQDN of a fileserver.
In Server 2008 R2 nothing was changed. So clients get the referall with only the netbios-name of the server.

In time where Microsoft wants WINS to die, why don’t they change that?

Getting the netbios instead of the FQDN of a server doesn’t make any problems when all your systems work in just a single active directory domain.
But if you need to gain access from outside the domain where the dfsroot is in, then using only the netbiosname can make a problem.

Two possible solutions are:
1. Add the dns suffix to the suffix search list, so it will try accessing the netbios name with the dns suffix attached if the netbios name isn’t found.
This has to be done on every client. It can be done by GPO or DHCP to not to touch all clients)

2. This is the one I preferr:
At a Registy key to the server that will be the root server for the namespace.
If the server already is a namespace server. you have to remove the root before setting the key.
The value is DfsDnsConfig = 1 (dWord) under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dfs

All DFS-Namespaces have to be build up again. For that you can export the namespace with dfsutli, change all netbios names into FQDN’s and import it back.

Read this KB article also:http://support.microsoft.com/kb/244380/en-us

Powershell: List Updates that are not Installed

Using the Microsoft Update Session ComObject, it is easy to determine the updates that are not installed on a computer at a moment.

# initialize the com object
$wsus = New-Object -ComObject "Microsoft.update.Session"

# build an update searcher
$wsussearch = $wsus.createupdatesearcher()

# build a filter and get the result
$res = $wsussearch.search("IsInstalled=0")

# list title and severity of updates that are not yet installed
$res.updates | Select-Object title, msrcseverity 

SCCM vNext and Powershell

Most of you already know the power of Powershell. Also more and more products, also of the System Center family, have support for Powershell.

But what about SCCM?

In the actual version, SCCM 2007, there is little support for Powershell.
Only because the Powershell has a small amount of cmdlets for WMI, it can be used for managing, administration and automation on SCCM.

So what’s about Powershell support in SCCM vNext?

As I’m very interested in that topic I have asked several people including MVP’s and the technical partner line from Microsoft to get a hint.
All answers are pointing towards the same direction:

“No official statement at the moment, please look forward to MMS 2010

So, in the words of Douglas Adams: “DON’T PANIC”,
just be patient for a few days more…

Do you know Opalis?

In December 2009 Microsoft bought the leader in datacenter automation and his famous product “Opalis Integration Server”.

Using Opalis you can fully automate provisioning in your datacenters. For example, building up a Virtual Server without any interaction in just a few minutes or adding a new user to all your systems with just a single click.
All of these tasks are done using a little process. The processes are build using drag and drop.

Microsoft has now released a roadmap of the integration of Opalis into its System Center products.  Opalis - Roadmap As shown in the picture, the first step is to update the installer. At the moment it is a JBoss with several Java classes to download from all over the internet for get it up and running.
Next steps are to build adapters for known systems to natively support them. As a person from the technical support line claimed, it is will be available over software assurance in the late 2010. The release of vNext with fully integration into the System Center family is planned for 2011. More information will follow later on, perhaps after the MMS 2010.

For more information’s, see this sources also:

Opalis on Microsoft pathways

Blog: Opalis software availability and roadmap

Technet: Opalis

System Center website refreshed

The website for all Microsoft System Center products was refreshed. It helps you to find everything about all System Center products in a short amount of time.

So if you need information’s about any System Center product, your first look should include this page:

http://www.microsoft.com/systemcenter

Search for a string in a bunch of files …

A colleague had a directory with a lot of log-files in. In these he wants to search for a string and get the filename and line number automatically.

So we made this simple code in Powershell:

param($searchstring)
$items = Get-item *.log 
Foreach($item in $items)
{
                $loc = $item.fullname; 
                $content = get-content $item
                $contentcount = $content.count

                For($i = 0;$i –lt $contentcount; $i++)
                {
                               If($content[$i] –match $searchstring)
                               {
                                    "$loc:$($i+1)"
                               }
                }
}

So he was happy.

A few days later he came around with a simpler one:

select-string -path "*.log" -pattern "$searchstring" -allmatches -simplematch

SCAPaoT – what the hell is that?

Dear reader,

welcome to SCAPaoT. Ok, this is yet another blog for technical themes like there are so much others out there. But what is it for?

The goal is to deliver information’s about many themes regarding System Center, Automation, Powershell and other themes that comes into my mind and I’m faced with in my daily practice.

As the title claims, these are questions about Microsoft’s System Center products and process automation on enterprise environment.

Also Powershell will take a big part, as I’m a real fan of it and it is the most powerful scripting language that has ever developed for Microsoft systems. Nearly everything can be done with just a few lines of code.

So if you are interested, please stay tuned.

Kind regards,

Benedikt

Change Bitlocker PIN without administrative rights using SCCM

While everyone is talking about Bitlocker, there are still some tasks to be done if your going to deploy it in an enterprise.
One of these tasks is, that non administrative users are not allowed to change the Bitlocker PIN (if you decide to use TPM and PIN as protector for the system drive).

At our own environment we decided to use the SCCM to accomplish this task.

  1. We built a nice little app (VB.net) that uses the Bitlocker WMI interface to get the new PIN from the user.
  2. We built a little program that executes an advertisement using the command line. This is done using the UIResource.UIResourceMgr-Class.
  3. We made an package in SCCM with a program called “Set-Pin”. This package has “Persist content in client cache” enabled so execution works also in notebooks without access to the SCCM. Also it was set to execute “Only when a user is logged on” and “Run with administrative rights” and “Allow users to interact with this program”.
    This package is advertised to each client without an mandatory assignment, so it can be executed by each client as often it is started.

Now every client has a link in the start menu that executes the SCCM package (PackageID) and the program “SetPin” with administrative rights (as the SCCM-agent has administrative rights on the client).

Bitlocker PIN tool

 

As a nice little addition, our little tool was built with a “force” method. So we can force people to set the PIN (for example, on every new system or when a system changes his owner).

 

I have to say a big thanks to “the god of programming” for his support on building the little apps!