virtual techdays INDIA │ august 2010 INVENTORY YOUR NETWORK AND CLIENTS WITH POWERSHELL Govindaraj Rangan │ Technology Strategist, Microsoft Corporation
Participate in Quiz Will be live till 5:00pm today Win EXCITING PRIZES like Netbook PCs, Arc Mouse and Movie Ticket Coupons Your Feedback is important to us Technical problems during the session? Change your status on the top-right corner of your screen Questions – Use the “Q&A Panel” on LiveMeeting console virtual techdays INDIA │ august 2010 ANNOUNCEMENTS
POLLS
Windows Powershell Windows Management Instrumentation (WMI) Demo, Demo, Demo virtual techdays INDIA │ august 2010 S E S S I O N A G E N D A
Both a shell and a scripting language Extensible Foundation for most of the Management GUI Rich support to connect to various interfaces like WMI, ADSI, COM,.NET The Best of VBSript, Perl, Python and Unix Shells Object-oriented Ships with Win2008R2 and Win7, available for WinXP, Win2K3 Windows Powershell Introduction
Powershell not associated with.PS1 Doesn’t run script by Default Doesn’t run scripts without a path You need to autograph your script Restricted – Don’t run any script or config file Allsigned – Don’t run any unsigned script Remotesigned – Run scripts created locally, but look for signature when you download Unrestricted – Open door Demo: get-executionpolicy Windows Powershell Security
Present since Windows NT 4.0 DMTF initiative Common Information Model (CIM) Does not require Powershell on the remote computer Windows Management Instrumentation (WMI) Introduction
Namespaces: eg. root\CIMv2, root\Microsoft\SQLServer Classes: eg. Win32_Services Instances: eg. BITS, W3SVC Properties: eg. Name, Status Methods: eg. Start, Stop Windows Management Instrumentation (WMI) Model
virtual techdays INDIA │ august 2010 DEMO: Exploring WMI WMI CIM Studio/Object Browser
“Windows Management Instrumention” Service must be running Verify WMI Security (MMC WMI Control) Verify Firewall restrictions, enable “Remote Management” WMI namespaces/elements vary from machine to machine Poorly documented Open Information model, results in many unused classes The WMI element that you want to query need to be there on the remote computer, not necessary on your local computer Windows Management Instrumentation (WMI) Preparing to use WMI
virtual techdays INDIA │ august 2010 DEMO: Exploring WMI with Powershell get-wmiobject
Use –filter parameter to narrow down instances Use –computername (get-content names.txt) Use –AsJob to run in background Use Get-Credential to create a reusable credential object that contains a password Use Error Handling (covered in demo) Windows Management Instrumentation (WMI) Best Practices
virtual techdays INDIA │ august 2010 DEMO: Optimize WMI results -filter
virtual techdays INDIA │ august 2010 DEMO: Getting them all together
virtual techdays INDIA │ august 2010 RESOURCES WMI Tools f2abdc3ed314&displaylang=enBenefit/Details f2abdc3ed314&displaylang=enBenefit/Details Powershell Script Repository us/site/search?f[0].Type=ScriptLanguage&f[0].Value=Powershell&f[0].Text=Windows%20P owerShell us/site/search?f[0].Type=ScriptLanguage&f[0].Value=Powershell&f[0].Text=Windows%20P owerShell
Feedback Quiz virtual techdays INDIA │ august 2010 DON’T FORGET
virtual techdays THANKS │ august 2010 THANK YOU