Tag Archives: Powershell

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

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

Auto load command history

With these few lines in your Powershell Profile you will auto load the command history from the last session. Run “notepad $profile” and add this: πŸ™‚

Posted in PowerShell | Tagged , | Comments Off on Auto load command history

SQL in Powershell without cmdlets

I am currently playing around with ConfigMgr 2012 cmdlets… and they only run in X86 (*doh*). Anyway, I need to query a database with information about some collections and other stuff I need to create… and running SQL Server cmdlets … Continue reading

Posted in PowerShell, SQL Server | Tagged , , , | Comments Off on SQL in Powershell without cmdlets

Logon Scripts in Powershell – Part4: Trigger ConfigMgr client actions

With the ConfigMgr agent in place on your client’s you probably want to force it to start some client actions on logon to speed up deployment of new applications. This function will work with the ConfigMgr 2007 (on x86) and … Continue reading

Posted in ConfigMgr, PowerShell, Series | Tagged , | Comments Off on Logon Scripts in Powershell – Part4: Trigger ConfigMgr client actions

Logon Scripts in Powershell – Part3: Storing and retrieving shares to map to/from AD

To keep you logon scripts static one way of storing information on who sould get what mapped is to use the Active Directory. First of, talk to the AD-guys and “reserve” 3 attributes on groups (or extend the schema and … Continue reading

Posted in PowerShell, Series | Tagged , | Comments Off on Logon Scripts in Powershell – Part3: Storing and retrieving shares to map to/from AD

Logon Scripts in Powershell – Part2: LDAP-Queries

Next up… running LDAP in pure Powershell. It would of course be nice to use ActiveDirectory cmdlets in the logonscript… but you probably don’t deploy those to all machines. So, running LDAP queries can be done using a ADSI Searcher. … Continue reading

Posted in PowerShell, Series | Tagged , , , | Comments Off on Logon Scripts in Powershell – Part2: LDAP-Queries

Logon Scripts in Powershell – Part1: Network Locations

Long time no blog… Since I have written the logonscript we use (of course in Powershell).. why not share some snippets. πŸ™‚ Starting out with the most common ones that “everyone” use. Map shares on file servers… I prefer to … Continue reading

Posted in PowerShell, Series | Tagged , | Comments Off on Logon Scripts in Powershell – Part1: Network Locations

PoSH: Send-Prowl

So I’ve been playing around with Prowl on my iPhone and since the Prowl API is really simple to use why now try some Powershell πŸ™‚ Here is a function that i wrote: Just download the Prowl APP (from iTunes … Continue reading

Posted in PowerShell | Tagged , , | 1 Comment

Set ConfigMgr 2012 Working Hours with Powershell

The “working hours” defined in ConfigMgr 2012 Software Center on the client is a bit off for our environment… Did a bit of digging and found some examples in VBScript, but I like Powershell… πŸ™‚ And this is how you … Continue reading

Posted in ConfigMgr, PowerShell | Tagged , , , | Comments Off on Set ConfigMgr 2012 Working Hours with Powershell

Keep a list of user/computer groups in registry

In the migration to ConfigMgr 2012 we are aiming at just keeping one collection for software distribution and instead rely on global conditions. We do want to keep the option to add a user to a group and with that … Continue reading

Posted in ConfigMgr, PowerShell | Tagged , , , , , | Comments Off on Keep a list of user/computer groups in registry

Get ConfigMgr Collection rules

I’m in the process of installing Forefront Endpoint Protection and wanted to look at some of the collection queries that was created… but with the ConfigMgr console you cant view them… So Powershell it is. Did a function that you … Continue reading

Posted in ConfigMgr, PowerShell | Tagged , , , , | Comments Off on Get ConfigMgr Collection rules