Powershell – Clear required PXE deployment for SCCM device

First of all, you can do all this with the console. If you can, just do it. But I Always try to automate my work and when I create a new Citrix image i need to clear the PXE for my server before I can start a new deployment. I ran into some errors which […]

PowerShell – Ask only for a password and use that in your script

If you need a credential object, you can use Get-Credential to ask for credentials and use them in your script. But what if your only need a password? For example, when you need a password during installation of software. You’ll need a password in plain text most of the times. If you use Read-Host the […]

PowerShell – Passing all function parameters via 1 config object using splatting a hastable

Do you ever write a function with so many parameters that it reaches the right end of your screen? In that case, putting all parameters in 1 object might be a usefull replacement, right? Powershell supports a method to achieve exactly that! It is called splatting. We create a PowerShell hastable and put all parameters in […]

PowerShell – How to execute PowerShell code before and after a given scriptblock

I hope the description was clear enough to understand what i mean 🙂 As a programmer or “scripter” you really want to copy/paste as less as possible and keep the code clean. This reduces the chance of failures/bugs and much more readable. For this reason you have to use functions when code is used more than […]

PowerShell – How to colorize a datatable or custom object with PowerShell

Unfortunatly I did not find a way to colorize a table without using Write-Host. This would be very awesome and would safe a lot of code. The problem with outputting tekst to the console with Write-Host is that you can’t use the automatic width of the columns. To fix that I calculated the width of […]

PowerShell – How to compare array with an other array using wildcards

If you want to find items in an array using a single string, you can use wildcards to match that item. Example:

PowerShell – Get RoboCopy Exit Codes

If you use RoboCopy in your PowerShell script, you might want to know if everything went well. Besides the log file, you can check the Exit Code as well.

PowerShell – Get Folder Size

If you need the size of an folder in MB’s. You can use below script to obtain this information. The $FolderSize variable will return the folder size in the following format: 77,84 MB

PowerShell – How to run Exchange powershell commands from a regular PowerShell window

What if you want to execute Exchange commands/Cmdlets from a script? Or you just hate the ugly Exchange management shell (like me) and want to use the regular (blue) PowerShell window?

PowerShell – How to check for open port without telnet!

What if you want to check for open ports on a server, but you don’t have telnet installed on your management server? Yes! Use PowerShell! But how?

About Me

My name is Bart Scheltinga and I live in the Netherlands. I work as a Senior Citrix Administrator for Conclusion FIT.

MCSA Windows Server 2012
CCA-V: Managing Citrix XenDesktop 7 Solutions CCP-V: Deploying Citrix XenDesktop 7 Solutions


My Twitter Feed