Powershell Scripting on Vista and XP in AD
Examples (on local and remote PC’s) Show COM,ADSI,.NET, WMI techniques List drives List Software installed into Excel sheet Rename administrator account Change administrator password Add/remove account in administrators group Start/stop service Change registry key properties Schedule a task on remote PC Scripts enable easy Management of many PC’s
Techniques COM – to automate applications ADSI – access AD objects.NET – access.net classes, methods and properties WMI – access wmi namespaces, classes, methods, properties and instances
Powershell set up Install powershell version 1 - needs.net 2 Version installed found in C:\WINDOWS\Microsoft.NET\Framework Community Technology Preview powershell v2 available)– needs.net 3 for some features.net 3 already on Vista Cannot run both versions of Powershell Install Quest ActiveRoles management shell snapin Install Quest PowerGUI(for script editor) Install PowerGUI snapins(for AD,network,exchange) Install WMI browser (powershell script)
Target Computer Configuration Add powershell account to local administrators Enable WMI exception in firewall on Vista Enable remote management in GP on XP Start remote registry service
Remote management Group Policy on XP Run MMC Add group policy object editor snapin Go “Computer-Admin templates-Network- Network connections-windows firewall” Go Domain profile Enable “windows firewall : Allow remote administration exception” specify IP’s allowed access Run gpupdate
Demo’s Powershell run on Vista enterprise Target is Vista on Virtual PC in AD location Clients\departments\School of biological…\TEST Target is XP on PC in same location in AD
Sources of Info Scripting PowerGUI documentation and examples Powershell script repository WPScripts.ashx WPScripts.ashx Webcasts WMI
Sources of software Powershell Quest ActiveRoles Management shell Quest PowerGUI PowerGUI snapins WMI explorer