Rodney Buike - Founder and original lazy admin.

Daniel Nerenberg - Microsoft MVP and lazy admin.

Disclaimer

These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

XenDesktop VDI and Dynamic Memory

XenDesktop is one of the leading VDI solutions right now due to its ability to run on the three major virtualization platforms.  When running Windows 7 SP1 VDI desktops with XenDesktop you may want to take advantage of Dynamic Memory for the workloads to increase VM density.  Unfortunately this cannot be done within XenDesktop at the time but you can do so via PowerShell. 

The following script created by Vlad Borodin and edited by my colleague Alex Khassanov will find all VMs on a Hyper-V host and enable Dynamic Memory on them.  You’ll need to know the Hyper-V host name, the prefix for the VDI VMs as well as the startup, maximum and buffer settings for Dynamic Memory. 

# PowerShell Script for changing RAM settings for several machines

# Vlad Borodin (vladboro@hotmail.com)

# 05 Mar, 2011

# Modified by AK, Jan-24-2012. Enable dynamic memory, set dynamic memory params

Write-Host("——————————————————–")

Write-Host("This script

Continue reading XenDesktop VDI and Dynamic Memory

PowerShell Basics–Part 4

The last part of this series we’ll let at some more common tasks and how you can use PowerShell to solve them.  Yes, I’m certain you have that new $50,000 inventory system that does everything…. What?  Everybody doesn’t?  Built into every Windows Powershell console is the ability to run WMI Queries EASILY.   Here’s a quick take away for you right now.  Need to know some BIOS details of a remote PC?

GET-WMIOBJECT win32_bios –computername ‘nameofcomputer’

Now how about if that computer is a DELL system?

(GET-WMIOBJECT win32_bios –computername ‘nameofcomputer’).SerialNumber

But did you need to get that information for a series of computers in your Active Directory?  Enter the Power of Shell to query All the service Tags in mysterious Division X

# Quest
GET-QADCOMPUTER –searchroot ‘Contoso.local/Division/X/Computers’ | FOREACH (GET-WMI-OBJECT win32_bios –computername $_.Name ).SerialNumber

# Microsoft
GET-ADCOMPUTER –filter ‘*’ –searchbase ‘OU=Computers,OU=X,OU=Division,DC=Contoso,DC=Local’ | FOREACH (GET-WMI-OBJECT win32_bios –computername $_.Name ).SerialNumber 

 

Here’s one

Continue reading PowerShell Basics–Part 4

PowerShell Basics–Part 3

In part 3 of this series we’ll look at the most common task most admins face.  Locked user accounts, forgotten passwords.  Think of how much time you spend fixing these issues.  You say your biggest challenge is the 5% of the people who tie up support with 98% of the lockouts and need to be resolved now?

# Quest
UNLOCK-QADUSER ‘John Smith’

# Microsoft
UNLOCK-ADACCOUNT –identity ‘John Smith’

But wait.  Did a whole division of users from Division X have a really big party at lunch and NEED to all be unlocked NOW?  Shame on them but, hey! No challenge!

# Quest
GET-QADUSER –Searchroot ‘Contoso.local/Divisions/X/Users’ | UNLOCK-QADUSER

# Microsoft
GET-ADUSER –filter ‘*’ –SearchBase ‘OU=Users,OU=X,OU=Divisions,DC=Contoso,DC=local’ | UNLOCK-ADACCOUNT

Reset Passwords

Fred Flintstone from accounting has locked himself out! It’s the end of his world (and your day) if he can’t log into his

Continue reading PowerShell Basics–Part 3

PowerShell Basics–Part 2

In part 1 of this PowerShell series we covered off some of the basics.  In part 2 we’ll take a look at some real world tasks you can speed up with the help of Powershell.  These examples will use PowerShell as well as the free PowerShell tools from Quest.

The head of HR comes bursting in your door screaming to quickly disable the VP in Division X because an Audit has turned up some nasty details about their new “Fund Management Scheme”.   No problem for you when you simply execute a PowerShell script.

# Quest
DISABLE-QADUSER ‘Mister X’

# Microsoft
DISABLE-ADACCOUNT –identity ‘Mister X’

Or perhaps it’s that entire division at Contoso that needs to be disabled?

# Quest
GET-QADUSER –Searchroot ‘Contoso.local/Divisions/X/Users’ | DISABLE-QADUSER

# Microsoft
GET-ADUSER –filter ‘*’ –SearchBase ‘OU=Users,OU=X,OU=Divisions,DC=Contoso,DC=local’ | DISABLE-ADACCOUNT

 

Perhaps you’ve just taken over as the

Continue reading PowerShell Basics–Part 2

PowerShell Basics–Part 1

Guest blogger Sean Kearney, aka The Energized Tech, is back with a few posts on PowerShell.  Few people know PowerShell like Sean does and he has some great posts coming up with some tips on everyday tasks you can use today.  Telling somebody to “Use Powershell” is all fine and dandy.    Telling me it’s easy is wonderful too.  But… uh… where do I start?  Is a Network Administrator there are tasks we perform on a regular basis.   The fine details overall change for each one of us, but I believe personally there are just some things we’re ALL asked to do.  Now I’m going to be referring to a set of tools from Quest software called the ActiveRoles Management Shell for Active Directory when working with Pre Server 2008R2 environments and the newer built in ones from Microsoft.  Which should you use?  The choice is obvious. 

If

Continue reading PowerShell Basics–Part 1