Posts

Copy AD group memberships from a source user to other users

Note: This blogpost is also posted on my personal blog – https://itmicah.wordpress.com

One of those mondaine tasks you get to do as an IT administrator is assigning users to security groups for access to resources in the domain. Usually, when you ask the person making this request which security groups the user account needs membership for, they’ll tell you to use some other user account as a reference. Sometime you’ll even get a list of users that need to have the same memberships. Read more

Change network connection category using PowerShell

Note: This blogpost is also posted on my personal blog – https://itmicah.wordpress.com

 

refwin-advfirewall-img4

I recently came across an issue with PSRemoting to a Windows 7 XenDesktop VM. I discovered remoting was disabled on the remote system because one of the network connections was a Public connection (it was the PVS connection). To change this using PowerShell is quite easy in Windows 8 or higher: the Set-NetConnectionProfile command is available to do just that. However, in Windows 7 this is not so easy. Even though PowerShell 4 was installed, the command was absent. So I decided to create my own functions to facilitate this, based on this script by Microsoft: LINK. This script utilizes the Network List Manager to make the change.  Read more

PowerShell: HP OneView Appliance backup script

When you’re using HP OneView to manage your HP hardware (virtual connect etc.) you can manually create a backup by using the web interface.
Because its a manual proces, it would be an to intensive process to do that on daily or weekly base.

That’s why i created this HP OneView Appliance backup script that uses the Rest API to create a backup and then download it from the appliance.
The script also can archive older backups, to keep everything nice and clean ;).

Please email me when you have any question or suggestion.

Save the script as Oneview-backup.ps1 and run it once (per host and per user) to provide the password which will be saved encrypted.

Read more

Powershell: Backup Lync 2013 configuration

One of the most important things to do when using Lync 2013 is to backup the Lync 2013 topology and configuration.
With these backup files and your ssl certificates you can restore your basic Lync environment (without the data).

With this powershell script you can easily backup these configuration files and as a bonus you can also backup the persistent chat database.

You have to run the script on a machine with the Lync cmdlets (Administrative Tools).

Read more

Powershell: Enable multiple Lync 2013 users

When you have a large Lync 2013 environment with several OU’s, you want to “Lync enable” users automatically, and maybe you require a specific user policy for those users. (As you can see i used a VDI policy in my example) With this powershell script you can add as many OU’s as you like as long as you separate them with a comma. Users to enable within a specific OU are selected by: AD account is not disabled, AD account has an e-mail address, AD account is not Lync enabled yet. When you fill out the configuration lines at the begin, your ready to go. You have to run the script on a machine with the Lync cmdlets (Administrative Tools). I’ve tested the script for Lync 2013 implementations.

Read more

Starting PowerShell as default within Windows Core

LD0001467786_1 My lab environment runs on Windows 2012 R2 Core, with Hyper-V installed. It runs smoothly. When I need to manage the environment I can do the most common task right there on the prompt.

But with Microsoft pushing everyone to use PowerShell I don’t understand why Windows Core start with a normal prompt instead of a PowerShell prompt.

In this article I will describe how you can change the prompt that is launched when Windows Core boots from CMD to PowerShell.

Read more

PowerShell coding on a Mac

Screenshot 2014-06-10 13.30.13 Because my main workstation is a MacBook pro, I use a Windows 8.1 virtual machine for most of my PowerShell coding work or I connect via RDP to my management server. But sometimes I want to quickly edit a script to send it to a coworker or friend. It is possible to edit a PowerShell script in any text editor that is available. But for PowerShell coding it handy if your editor is PowerShell language aware.

Read more

Extract SequencerVersion from .appv file

For a Windows XP migration project to Windows 7, we were migrating VMWare Thinapp applications to Microsoft App-V applications. Most of the time, we’d use App-V 5.0 SP1 to build the sequence. However, there were some applications that made the App-V Sequencer become unresponsive during the monitoring process, as seen below.

appv-crash

To solve this, we used the App-V 5.0 SP2 Sequencer for those applications.

After the project was over, the customer obviously wanted to know which applications were done with SP2. I’ll be really honest here and say that we forgot to keep track of that. I took the issue upon myself and said I’d find out, while thinking “It should somehow be possible with PowerShell.”

Read more

Create a PowerShell Profile ready for XenDesktop Management

PowerShell_Logo Today I want to show you how to create a PowerShell instance that is all ready for managing a Citrix XenDesktop 7.1 environment.

We’ve all been there you want to check something quickly in your environment. You start up PowerShell, enter a command and you are presented with an error message that the command you just entered is not recognized by PowerShell.

Screenshot 2014-05-06 21.34.56

We get this error message not because of a typo but because the Citrix Snap-ins are not loaded in this PowerShell session.

Read more

Managing SQL 2012 Server with PowerShell remotely

download In this article I want to talk about managing a SQL 2012 Server with PowerShell from a remote computer. As I’ve mentioned in an earlier blog post PowerShell is becoming more and more important in the day to day task of a system administrator.

As my main work machine is a MacBook I perform my PowerShell from within a virtual machine. This virtual machine runs Windows 8.1.
I am using PowerShell ISE as scripting application. It is a simple scripting tool but it does everything I need at this time to make my PowerShell work easy.

Read more