Blog
Wissenstransfer von IT-Spezialisten

sepago Spezialisten bloggen über Citrix und Microsoft

Hier bloggen sepago-Spezialisten über ihre Themen: Automatisierung, Cloud Solutions, IT-Security, aktuelle Entwicklungen rund um Citrix- und Microsoft-Technologien, Arbeitskultur.

| |

Why using JSON Files in PowerShell is neat

In the last couple of weeks I worked a lot with PowerShell and text-based input files to separate code and data. Since my beginnings in PowerShell I always used XML-based files to cover the separation.

The task I am currently working on is very complex and the designed XML data structure is not readable in an editor like notepad++ anymore. Due to this I had to search for an alternative file format. Some colleagues of mine are currently involved in Microsoft Azure projects and I heard about the JSON file format from them.

| |

Microsoft Azure: AzureVM wakeup/shutdown script

As many others I use Microsoft Azure for more and more reasons. Most of my test and demo environments appear in the Microsoft cloud and will be used anytime from anywhere.

The big advantage is the pay-as-you-go strategy. I just need to pay for the resources I really use. My MSDN account gives me the abillity to spend 75$ every month in azure for free 🙂

But on the downside, 75$ are used up very fast and so I just wanted to run my mashines if I really need them.

| |

Freeware SID2Username Tool

SID2Username is a tiny tool for determining textual the SID from a given username and vice versa.
With its implemented features to monitor the clipboard and automatically translate the input, it is extremely helpful for administrators.

SID2Username converts user names to textual SIDs and vice versa. Resolved user names are displayed as <domain>\\<username> and textual SIDs appear in the well-known <S-1-2-3-4567890> format.
The corresponding information can be obtained for local users and users belonging to the currently logged on domain.

| |

PowerShell: Including Scripts, Functions and Modules

This post is about including PowerShell scripts, functions and modules to the active session or to another script. First we need a simple script that we will save as Hello-World.ps1.

1

$Date = Get-Date -Format yyyy-MM-dd

1

$Time = Get-Date -Format HH:mm

1

1

Write-Output „Hello World“

1

Write-Output „[Date] $Date“

1

Write-Output „[Time] $Time“

Run a PowerShell Script

Okay. Now let’s start the script:

1
2
3
4
5

PS D:\Scripts\>

| |

PowerShell: Scripts, Funktionen und Module einbinden

In diesem Artikel geht es um das Einbinden von PowerShell Scripts, Funktionen und Modulen in die aktuelle Session oder ein anderes Script. Zunächst benötigen wir ein einfaches Script, welches wir unter Hello-World.ps1 speichern.

Ein PowerShell Script aufrufen

Führen wir das Script einmal aus:

PS D:\Scripts\> .\Hello-World.ps1
Hello World
[Date] 2013-11-17
[Time] 17:05
PS D:\Scripts\>

Das Ergebnis ist wenig überraschend – das Script wird einfach ausgeführt! Auf diesem Weg können wir das Script natürlich auch aus einem anderen Script aufrufen.

| |

Create lists of GPO settings with Powershell

The other day I had to finish off the documentation for a XenApp 6.5 Implementation I did a couple of months back for one of our customers.  Of course group policies are a configuration item, I wanted to have in that document.
What I did not want was the default format that the Group Policy Management Console offers in its HTML Reports of GPO settings.
What else could I do?
Of course there is the option to create an XML export with the Group policy module imported into PowerShell.

| |

PowerShell: Arbeiten mit Pfaden und Locations

In der PowerShell gibt es verschiedene Location-Cmdlets für die Arbeit mit Verzeichnispfaden. In diesem Artikel möchte ich eine praktische Anwendungsmöglichkeit für diese Befehle vorstellen. Das Beispiel stellt aber nur einen kleinen Ausschnitt der vielfältigen Nutzungsmöglichkeiten dar und soll zu eigenen Experimenten mit den Cmdlets anregen.

Get-Location

Wenn wir eine PowerShell-Konsole öffnen, zeigt uns diese das aktuelle Arbeitsverzeichnis an.

Wollen wir dieses Verzeichnis in einem Script ermitteln, können wir das mit Get-Location tun.

| |

PowerShell: Working with Paths and Locations

PowerShell provides several Location-cmdlets for the work with directory paths. This post will show you a useful task for these commands. But this is only one cool thing you can do with the cmdlets and it’s meant to encourage you to experiment on your own.

Get-Location

When we open a PowerShell console, it will show us the actual working directory. If we want to identify this directory out of a script, we can do that with Get-Location.

| |

How to execute ConfigMgr 2012 Task Sequence from Powershell

Execution of a ConfigMgr task sequence from Powershell

This little script or function I wrote because I saw a question on the german TechNet forums about it.

An user asked if it was possible to execute a Task Sequence from a script (Powershell in this case). There are some VBS around, but as I’m not too fluent in VBS and I like writing Powershell I thought, why not?!

I did come across some customers running Task Sequence after Task Sequence.