Windows PowerShell and Microsoft Management Console (08-02-2007)


Good afternoon all of MY Powershell developers.  I am glad you tuned into the webcast on powershell and here a few resources and questions from the webcast.  Please comment if I missed any or if you need additional information.

Replay of the Webcast: Windows PowerShell and Microsoft Management Console

Virtual lab: Longhorn Server – Windows PowerShell and MMC Labcast On-Demand

Question: Where can I get more verbs?
Answer: http://msdn2.microsoft.com/en-us/library/ms714428.aspx

Question: Can you use power shell to run a query that shows processes and the associated network ports and open files for each process?
Answer: Take a look here for more information on that: http://blogs.msdn.com/powershell/archive/2007/01/16/managing-processes-in-powershell.aspx

Question: What’s the worst thing that can happen if you *do* use console.something? Also, what are some of the worst mistakes you’ve seen made by PS newbies?
Answer: Really this comes back to proper coding and what is the worst thing that can happen there, in regards to powershell you could have a loop that increase cpu utilization, or the app just will not work. I hope that helps.

Comments (2)

  1. Lionel Fourquaux says:

    > Can you use power shell to run a query that shows processes and the associated network ports and open files for each process?

    The page you point to does not seem to answer this question. It does explain how to get a list of processes, but says nothing about getting the open ports and files for these processes.

    AFAIK, getting the open ports requires a call to native code (GetExtendedTcpTable) or parsing the output from netstat, and getting the list of open files requires a kernel-mode driver or calling undocumented&unsupported APIs (e.g. NtQuerySystemInformation), or using special boot options.

    Both tasks could be nice additions to PowerShell or to an underlying tool, e.g. WMI.

  2. Anonymous says:

    Matt Hester, a Microsoft IT Pro Evangelist, did 2 webcasts about PowerShell and both with a complementing