Powershell script to get all computers last logon time

I wrote a script to get the last time each computer logged into the domain. ##============================================================================== ##============================================================================== ## SCRIPT………: Get-AllComputerLastLogon ## AUTHOR………: Clint McGuire ## EMAIL……….: ## VERSION……..: 1 ## DATE………..: 2011_05_26 ## COPYRIGHT……: 2011, Clint McGuire ## LICENSE……..: ## REQUIREMENTS…: Powershell v2.0, Quest AD Cmdlets ## DESCRIPTION….: Gets all computer accounts’ last logon times

Continue reading Powershell script to get all computers last logon time

Powershell script to get all AD users’ last logon time

I wanted to see when all users in a client’s domain last logged in.

Here is the script I wrote. ##============================================================================== ##============================================================================== ## SCRIPT………: Get-AllUserLastLogon ## AUTHOR………: Clint McGuire ## EMAIL……….: ## VERSION……..: 1 ## DATE………..: 2011_05_26 ## COPYRIGHT……: 2011, Clint McGuire ## LICENSE……..: ## REQUIREMENTS…: Powershell v2.0, Quest AD Cmdlets ## DESCRIPTION….: Gets all

Continue reading Powershell script to get all AD users’ last logon time

How to setup Citrix Access Gateway 5.0 with Active Directory

I recently setup a new Citrix environment for a client. I wasn’t able to find a good setup guide for the Citrix Access Gateway, so I thought I would write one.

The initial setup of the CAG is straightforward. Citrix has a video for the VPX setup, the physical appliance setup is similar.

Once the

Continue reading How to setup Citrix Access Gateway 5.0 with Active Directory

PowerShell Notes

Hmmm, what if I…? Add -whatif to the end of your script.

Am I sure I want to make this change to all those users/files/mailboxes? Add -confirm to the script and it will prompt for each item it is making a change on.

Must investigate VMware PowerCLI…

Need to look into PowerGUI and PowerPacks.

http://www.runasradio.com/default.aspx?showNum=203

Remote Desktop Server Management via PowerShell

Start the Windows PowerShell command window and switch to RDS context:

Click Start, click All Programs, and then click Administrative Tools. Right-click Windows PowerShell Modules, and then click Run as Administrator. In the PowerShell command window, type the following:  cd RDS:

Use Dir and CD browse through the options to find the settings you need.

Continue reading Remote Desktop Server Management via PowerShell

Add DHCP Reservations with a Script

It’s time to upgrade DHCP at one of my clients.   They have a lot of address reservations and we are setting up split-zone DHCP so I didn’t want to have to enter all the reservations by hand, twice.

There has to be a way to script this… PowerShell doesn’t manage DHCP, but I can

Continue reading Add DHCP Reservations with a Script

How to debug a crash dump

Grab the latest version of the Windows Debugger from here.

One you have installed the SDK, open WinDgb from Start, Programs, Debugging Tools for Windows.

The symbols need to be set so the debugger can read the dump file, to do this, click File, Symbol File Path and add the following line to the box:

Continue reading How to debug a crash dump

Schedule Server Reboot in WS08 R2 with Powershell

Scheduling a WS03 box to restart is very simple, I’ve done it more times than I can recall.

To get a WS08 box to restart using Powershell requires a few things.

1. The execution policy needs to be set to allow scripts to run.

2. The script needs to be written.

3. The task needs

Continue reading Schedule Server Reboot in WS08 R2 with Powershell

Windows 7 DirectAccess

A feature of Windows 7 and Server 2008 R2 that allows remote users to connect to the corporate network’s resources with out having to create a VPN connection.

This looks very interesting.

DirectAccess on TechNet.

ADPrep Error 0×80070002

When running ADPrep on Server 2003 from Server 2008 media you may get this error:

Error message: Error(110) while running C:WINDOWSsystem32LDIFde.exe The system cannot find the file specified.(0×80070002)

<error message has been trimmed>

Pausing your AV software will likely allow the command to complete successfully.  If it isn’t your AV there is something else that

Continue reading ADPrep Error 0×80070002