Skip to content

Category: PowerShell

About PowerShell

Mozilla FireFox deployment on MacOS and Windows

I’m a big fan of Munki (pronounced monkey, /ˈmʌŋki/, m ah nk ee, or Mung – KEY) an open-source project started by Walt Disney Animation Studios to deploy software and packages to Mac OS X and MacOS based clients. It is written mostly in Python, and it provides a nice way to enforce software installation and/or updates. And since it offers a Mac App Store like Client experience a lot of optional installations (e.g. self-service).

One of the things that I find very useful: You can use scripting as pre- and post-installation parts to customize everything. A few years ago (yep, I use this software for a while now) I started to build several packaged for others. Then the fist enterprise came along and asked me to help them out with an existing Munki installation, during that project, I created a lot of new packages and tweaked most of the existing ones.

Now, a couple of projects and years later, I found, that many still have issues creating packages with customization.

Here is my approach, and I try to stick with it whenever possible: Use packages that you can get from the Vendor, or the Project (if open Source). Even better: Establish an AutoPKG process and work with overrides!

Then use the power of shell scripts to tweak and customize. I’m a scripting guy! I know.

This content is older than 2 years. It might be outdated.

Script: Getting, install, or update some default DSC Resources I want to have available

I want to transfer more and more logic away from Group Policies towards Windows PowerShell Desired State Configuration (DSC). There are several reasons why i think that DSC is much better than my old (and complex) group policy constructs, but the main reason (at least for me): I can manage DSC clients that are domain joined, not domain joined, or even Azure Active Directory domain joined the same way.

This is also something I use for Edge servers (like Skype or Exchange); they are not domain joined. And if you have more than one that should do exactly the same, this is where DSC could become a life saver and make your life very easy.

I play around with several DSC Push and Pull server instances, but I wanted to have the same set of DSC resources available on all of them. At least until I know which to keep to reduce my own logic.

I use the DSC Script Resource a lot. I do a lot of checks and implemented a lot of logic and flexibility within a lot of Script Resources.
However, this is the wrong way to use DSC! At least, in my opinion!

There are some very cool ready to use DSC resources available, and this reduces the script resource usage (or what I did: abuse). Why should I keep my own logic when someone else created nearly the same as a central and maintained DSC resource?
I know: I’m lazy!

This content is older than 2 years. It might be outdated.

Tool that bulk imports or removes User pictures

Simple Tool that bulk imports or removes user pictures, based on AD Group Membership.
If a user is in both groups, the picture will be removed!
Idea based on my old tool to import Active Directory pictures.
They are a bit to tiny, so I use Exchange now to make them look better in Exchange and Skype.

The tool will not check the pictures. As long as a picture exists, it will try to import it. Then the Exchange Server might reject the import, and you will get a warning. Same for users with non existing Mailboxes: The Tool will not check anything for the User before it tries to import the picture.

The Pictures should be in the JPG format and not larger than 648x648px. With a depth of 24 bits, each picture has around 200-250 kilobytes. Keep that in mind if you load a big bunch of pictures.

The following formats are used:

  • 48x48px – Active Directory thumbnailPhoto
  • 96x96px – Outlook, Outlook Web Access, Lync/Skype and SharePoint
  • 648x648px – Lync/Skype Clients and Lync/Skype Web App
This content is older than 2 years. It might be outdated.
Copyright © 2018 by Joerg Hochwald. All rights reserved. ● Site is powered by Author