Author Archives: riro

PS ISE – Measure Script speed

Quick and easy way to measure execution time on a script, add the following to Microsoft.PowerShellISE_profile.ps1 Then, restart ISE and now you can Add-ons you will have a new menu item. 🙂

Posted in PowerShell | Comments Off on PS ISE – Measure Script speed

Silent patching and controlled reboots

Patching silently and installing applications without any user interaction… This is really hard to do and it’s really hard to get compliant machines if you do not force a reboot every now and then. Then, if you force the user … Continue reading

Posted in ConfigMgr, Good-to-have, PowerShell | 5 Comments

Refresh ConfigMgr content where it’s needed

This script will check for content that needs to be refreshed, in this case its content of types like packages, applications, drivers, etc that have the state Retrying or Failed on one or more DPs. When the script find some … Continue reading

Posted in ConfigMgr | Tagged , , , , | Comments Off on Refresh ConfigMgr content where it’s needed

Merry Instagram Christmas

OK, this post might be a bit late… But if you have a Instagramoholic friend that you don’t know what to give for christmas, this might be the thing. 🙂 Running this will output an image of all (Well, a … Continue reading

Posted in PowerShell | Tagged , , , | Comments Off on Merry Instagram Christmas

Migrate printers to new server

If you move printers from one server to another the users needs to reconnect all printers… And… of course it’s easy to do with a small Powershell script. 🙂 Example usage

Posted in PowerShell | Comments Off on Migrate printers to new server

Export / Import boot image drivers (needed before ADK upgrade)

If you want to deploy Windows 10 you probably need to upgrade your ADK… and when you have done your upgrade you can’t see any drivers on boot images in the ConfigMgr console. So, to get your “old” drivers in … Continue reading

Posted in ConfigMgr | Comments Off on Export / Import boot image drivers (needed before ADK upgrade)

Copy drivers from one boot image to another

When you have a new ConfigMgr boot image ready but are missing some drivers from an old one… might be hard to find them in a larger structure. … Powershell to the rescue! 🙂

Posted in ConfigMgr, PowerShell | Comments Off on Copy drivers from one boot image to another

Exclude updates during OS Deployment

With A LOT of inspiration from a blogpost by The Deploymentguys I wrote a couple of scripts that do not require internet access during OSD. First, I have a script that pulls the KB and extracts KB-numbers to an XML-file. … Continue reading

Posted in ConfigMgr | Comments Off on Exclude updates during OS Deployment

Find undefiened networks in netlogon.log

To find undefined networks in your AD you can parse the netlgon.log files on the domain controllers. (This script will gather all errors you can of add some “If ($_.Error -like ‘NO_CLIENT_SITE*’) …” if you only want that kind of … Continue reading

Posted in Active Directory, PowerShell | Comments Off on Find undefiened networks in netlogon.log

Remove old logfiles

Want to clean out old logfiles from IIS (or other products)?

Posted in PowerShell | Tagged , | Comments Off on Remove old logfiles

Get Powershell ISE to run scripts with -Verbose flag

Missing an easy way to run your scripts from ISE with the -Verbose or -Debug flag? Easy to add… Open up your Microsoft.PowerShellISE_profile.ps1 file and add the following lines: Now when you restart ISE you should see the options under … Continue reading

Posted in ISE, PowerShell | Tagged , | Comments Off on Get Powershell ISE to run scripts with -Verbose flag

Create Site Roles Collections

Quick and easy way to create device collections based on site roles: You will end up with collections like: – ConfigMgr-Role SMS Distribution Point – ConfigMgr-Role SMS Device Management Point – ConfigMgr-Role … and so on …

Posted in ConfigMgr, PowerShell | Comments Off on Create Site Roles Collections

Stand Alone Media and USB 3

I’m testing some Stand Alone USB Media for deployment of Windows 7 and 8… Ran in to a few problems… First off, it’s not to easy to find a USB-Stick with at least 32 Gb that is bootable. We found … Continue reading

Posted in ConfigMgr | Comments Off on Stand Alone Media and USB 3

Get filename in ConfigMgr 2012 ContentLib

In ConfigMgr 2007 it was kind of convinient to be able to edit files directly on a DP, in ConfigMgr 2012 that isn’t to easy if you are using Content Library. There are a few ways to find out where … Continue reading

Posted in ConfigMgr, PowerShell | Comments Off on Get filename in ConfigMgr 2012 ContentLib

ConfigMgr Package Status Reports

Found a nice idea for a report on Eswar Koneti’s blog. That query combined with some info from a blogpost by Jörgen Nilsson will give you two reports to dig into status of packages. Status of Distribution Points with Package … Continue reading

Posted in ConfigMgr, SQL Server | Comments Off on ConfigMgr Package Status Reports