Anything about IT

Daily IT topics by Alex Verboon

  • .NET Framework (1)
    64-bit (2)
    ACT (2)
    Active Directory (20)
    AGPM (1)
    AIK (11)
    AMT (1)
    Android (1)
    App-V (7)
    Apple (1)
    Applocker (1)
    Automation (66)
    Backup (1)
    Beta (8)
    BIOS (14)
    Bitlocker (2)
    BITS (2)
    BranchCache (5)
    Broadband (1)
    BSOD (1)
    Citrix (2)
    Cloud (3)
    Compaq (2)
    Compatibility (16)
    Computer Science (1)
    Deployment (93)
    DHCP (1)
    DirectAccess (2)
    drivers (9)
    Embedded (2)
    Energy (1)
    Excel 2007 (1)
    Fun (30)
    Google (3)
    Green (3)
    Group Policy (24)
    History (2)
    HP (9)
    Hyper-V (14)
    Hypervisor (1)
    IE8 (1)
    imagex (1)
    Intel (2)
    Internet (4)
    Internet Explorer (7)
    IPV6 (1)
    Job (1)
    Knowledge (52)
    Licensing (8)
    Live Mesh (4)
    MDOP (1)
    MED-V (4)
    Media Player (1)
    Microsoft (2)
    Microsoft Office (3)
    Mobile (4)
    MSE (1)
    MUI (1)
    Network (3)
    Office 2007 (5)
    Office 2010 (1)
    Office2010 (1)
    OS (1)
    Packaging (12)
    PDF (1)
    Performance (1)
    Powerpoint (1)
    PowerShell (3)
    product lifecycle (2)
    Protocols (5)
    Reading (50)
    Recovery (2)
    registry (3)
    RSAT (1)
    RTM (2)
    SCCM 2007 (1)
    Scripting (15)
    Security (20)
    Sequence (1)
    Sequencing (1)
    Sharing (1)
    Silverlight (1)
    SMS 2003 (1)
    SQL (2)
    SQL Server 2008 Express (1)
    Streaming (1)
    Symantec (1)
    TCP/IP (4)
    Tip (163)
    Tools (96)
    Tweak (1)
    Uncategorized (13)
    USMT (1)
    VDI (2)
    VHD (3)
    Virtualization (59)
    Vista (74)
    vmware (10)
    vPro (10)
    WAIK (2)
    Web (2)
    WHS (1)
    Windows 2000 (1)
    Windows 7 (92)
    Windows Home Server (1)
    Windows Mobile (1)
    Windows Server 2008 (25)
    Windows Server 2008 R2 (8)
    Windows Server 2008R2 (4)
    Windows Update Services (1)
    Windows XP (33)
    Windows7 (33)
    Windows7E (1)
    WinPE (1)
    Wireless (2)
    WMI (1)
    WSUS (1)
    WWW (1)
    XenDesktop (1)
    XP Mode (6)
    XPSP3 (1)
    YouTube (1)

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • Archives

  • Meta

  • Visitor Locations

Archive for the 'PowerShell' Category

Finding unused User Accounts in Active Directory

Posted by Alex Verboon on 10th December 2009

As we move towards the end of the year I thought it’s a good time to do some housekeeping activities within the lab infrastructure in which we work on a daily basis. Throughout the year we often create test user and computer objects within Active Directory and of course sometimes we forget to delete them.

As I don’t want to reinvent a wheel again I searched the web and soon found a whole bunch of tools and scripts that would help me identifying unused user accounts. I decided that I wanted to use a script. I first found the Last Logon Dates scripts from Richard L. Mueller which are written in WSH. But then I found the Managing AD User Accounts with PowerShell article on WindowsITPro and decided to use the opportunity of using PowerShell to accomplish my task.

Unfortunately the administration console I use hasn’t been migrated to Windows 7 yet, so I installed PowerShell 2.0 onto that Windows Vista client and then installed the Quest AD cmdlets.

On PowerShell.com I found the following script that I modified a bit so that the output is written into an HTML file.

Get-QADUser -sizeLimit 0 | where {$_.lastlogontimestamp -lt (get-date).AddDays(-30)} | Select NAme,description,lastlogontimestamp | convertto-HTML | Out-File c:\temp\adlastloggedon.htm

I wanted to do the same to find old computers, but it appears that the Get-QADComputer cmdlet has a bug, as it doesn’t return any LastLogonTimestamp values and I found various comments that this was identified as a bug which should have been fixed by now, but either the bug is still there or I might be doing something wrong. However I found a “find old computer objects” script on the Microsoft TechNet Script Center Gallery it just has a bid more lines of code :-)

Note that your Windows domain must be at Windows 2003 Domain Functional Level for updates to the llastLogontimeStamp to occur.

If you are looking for a command-line tool to find Old Computers in your domain, I recommend the OldCmp tool from Joe.

Related content:
The LastLogonTimeStamp Attribute” – “What it was designed for and how it works

Tags: , , ,
Posted in Active Directory, Automation, PowerShell, Tip | 2 Comments »

ToolTip – less misérables (MSI file extractor)

Posted by Alex Verboon on 3rd April 2009

Today I found a nice utility that allows you to easily extract individual files from an MSI package. The tool is called “less miséreables”. it’s a kind of a funny name, but it does the job.

To extract a file, simply launch the utility, select the file(s) you want to extract and click on the extract button.

image

Of course the same can be done by using the MSIEXEC command from the command line as shown below, but that does extract all files.

msiexec /a PathToMSIFile /qb TARGETDIR=DirectoryToExtractTo

Tags: , , ,
Posted in Automation, PowerShell, Tip, Tools | 1 Comment »

Active Directory Powershell Blog

Posted by Alex Verboon on 25th March 2009

Those interested in managing Active Directory with PowerShell, have a look at the Active Directory Power Shell Blog.

 

The Active Directory Powershell Blog

Tags: ,
Posted in Active Directory, Automation, PowerShell | No Comments »