Run an executable from a specific path that includes spaces and arguments

Many people who have worked with PowerShell have reached this problem. You have a exe file in a folder that includes spaces. (fx. “C:\Program Files\”)
This exe file needs to be called with an argument that starts with “-”. at the same time , you need to call it from another folder.

Category: Powershell, Scripting  |  Comment

How to list ConfigMgr package structure in Powershell

This post show how to do a list of all package structure in ConfigMgr 2007, via standard PowerShell.

Category: Configuration Manager, Powershell, Scripting, Software distribution  |  1 Comment

Microsoft Scripting Games 2010

  It is almost time for the annual Scripting Games at Microsoft Scripting Guys! Scripting games is a fun “competition” with a lot of different scripting challenges. This year it is held from April, 26 – May 7. I suggest all scripters to join the fun!, it is good practice for both newcomers and hardcore [...]

Category: Powershell, Scripting, VBScript  |  Comment

Automate your group creation with Powershell

One of our very good customers are managing servers with an dedicated internal administrator as a primary contact for each server. They are managing this one to one relation with an Excel sheet. A while ago we talked about automating this group creation with powershell, so the last time Jacob and I was discussing Powershell in [...]

Category: Operations Manager 2007, Powershell, Scripting  |  3 Comments

Powershell – WMI: Working with Shares – Part 1: Creating a Share with Custom Permissions

Download Script: Intro: Last week, i was teaching a Powershell course (MOC6434), when a student asked me, how to create a share with custom permissions via WMI. I tried to find an answer for him, but could not really find any examples, cmdlets or functions for it. I found some examples and help in vbscript, [...]

Category: Powershell, Scripting  |  24 Comments

Powershell Acticvesync wipe

In this Powershell sample (created with ASE) – its possible to create a simple form to let Helpdesk manage Activesync Devices, this is done by finding and wipe/unwipe the device. Feel free to change and clean-up – Try ASE – http://adminscripteditor.com/ – Its a great editor. #################################################################### # Program……….: ASExWipe.ps1                            # # Author………..: Kåre Rude [...]

Category: Powershell  |  Comment

Usefull Powershell Links and Books.

Links: Microsoft Scripting guys! Forum: Usually you will get very quick replys and help in there http://social.technet.microsoft.com/Forums/en/ITCG/threads Powershell 2.0 and others for All Windows (Windows Management Framework) http://support.microsoft.com/default.aspx/kb/968929 Writing Help for Windows Modules http://msdn.microsoft.com/en-us/library/windows/desktop/dd878343(v=vs.85).aspx Importing / Exporting Credentials in Powershell (Manually create Credential object) http://www.leeholmes.com/blog/ImportingAndExportingCredentialsInPowerShell.aspx Working wth ODBC: http://theessentialexchange.com/blogs/michael/archive/2008/01/07/multi-platform-database-access-with-powershell.aspx Create Custom Inputbox: http://www.microsoft.com/technet/scriptcenter/resources/pstips/feb08/pstip0208.mspx Working with [...]

Category: Powershell, Scripting  |  1 Comment