Showing results for FAQ - PowerShell Team

Jul 6, 2006
Post comments count0
Post likes count0

Revisiting: Listing all the COM automation PROGIDs

PowerShell Team
PowerShell Team

In the blog entry Listing all the COM automation PROGIDs http://blogs.msdn.com/powershell/archive/2006/06/29/650913.aspx . I showed how you could use the registry to get all the progids that you can use for COM automation. Here is a way to do the same thing via WMI (which allows you to do it to remote machines): Get-WMIObject Win32_ProgIDSpeci...

FAQWMICOM
Jul 6, 2006
Post comments count0
Post likes count0

How can a script tell what directory it was run from?

PowerShell Team
PowerShell Team

PSMDTAG:FAQ: How can a script determine what directory it was invoked from?PSMDTAG:FAQ: What is $MyInvocation?PSMDTAG:FAQ: Why is $MyInvocation.ScriptName empty? Create 2 scripts (First.PS1 and Second.PS1) to explore what is going on with $MyInvocation and how you can use it to determine what directory a script was invoked from: PS> cat first.ps...

FAQCMDLET:UTILITY
Jul 4, 2006
Post comments count0
Post likes count0

Use of Preference Variables to control behavior of streams

PowerShell Team
PowerShell Team

PSMDTAG:FAQ: Why don't I see output when I use Write-Verbose and Write-Debug?PSMDTAG:SHELL: Use of Preference Variables to control behavior of streams. In Windows PowerShell, the WRITE-XXX cmdlets merely sends things to a Named stream.  You then have user-defined preferences for what to do when things appear on that stream.  Alex Angelopo...

FAQSHELL
Jul 1, 2006
Post comments count0
Post likes count0

Perserving Command History Across Sessions

PowerShell Team
PowerShell Team

<Edited 7/2/2006 to add tags and Categories> Ben Winzenz didn't like the fact that Windows PowerShell did not maintain history lists between sessions (http://winzenz.blogspot.com/2006/06/cool-mshpowershell-tidbit.html) .   We hear you Ben.  Back to my least favorite phrase, "to ship is to choose".  That said, we try t...

FAQSHELLENVIRONMENT
Jun 29, 2006
Post comments count0
Post likes count0

Listing all the COM automation PROGIDs

PowerShell Team
PowerShell Team

<edited 7/2/2006 to add categories and PSMDTAGs> Windows PowerShell allows you to program against COM automation.  The typical way to do this is : $x = new-ojbect -ComObject <PROGID> The question then is, how do I know what progids I can use.  Here are there 3 answers I'm lucky enough to be in category 3 so I'll share a...

FAQTYPE:COM
Jun 26, 2006
Post comments count0
Post likes count1

Finding the static methods of a class

PowerShell Team
PowerShell Team

<Edited 7/2/2006 to add categories and tags> In the previous entry, it showed how you could use the static method GetHostAddresses of the [System.Net.Dns] class to resolve a hostname.  This begs the question, how do you find the static methods of a class.  There are 2 answers to this: 1) SDK documentation.  (remember the trick ...

FAQ
Jun 26, 2006
Post comments count0
Post likes count0

Windows PowerShell One Liner: Name to IP Address

PowerShell Team
PowerShell Team

<Edited 7/2/2006 to add tags and category>Wei Wu provided a nice one liner in response to a query in our NewsGroup: Microsoft.Public.Windows.PowerShell about how to resolve a hostname into an IP Address: PS> [System.Net.Dns]::GetHostAddresses("www.msn.com") IPAddressToString : 207.68.173.76Address       &...

FAQ
Jun 25, 2006
Post comments count0
Post likes count0

Improved Support for WMI

PowerShell Team
PowerShell Team

<Edited 7/2/2006 to add tags and categories>We have recently completed work on improved support for WMI including: Everyone that uses WMI owes a debt of gratitude to Greg Ramsey.  Greg did an MMS session and lab focused on Scripting SMS using VBscript and Windows PowerShell.  Jim Truher and I joined Greg to host a Birds of a...

FAQTYPE:WMI
Jun 24, 2006
Post comments count0
Post likes count0

Managing Active Directory with Windows PowerShell

PowerShell Team
PowerShell Team

MOW is now posting the details of his Managing Active Directory with Windows PowerShell demo that he performed at my TechEd talk.  This is worthwhile for everyone to review.  For the people at the talk, we covered a huge amount of data in a very short time so it would be worth while to walk through the details.  For everyone els...

FAQPHILOSOPHY
Jun 23, 2006
Post comments count0
Post likes count0

Leveraging Windows PowerShell Type Extensions to get documentation

PowerShell Team
PowerShell Team

After just a little use of Windows PowerShell, you quickly learn that you need to pipe objects in the GET-MEMBER utility to understand the capabilities of that object.  Get-Member reflects against the object and shows you all of its methods and properties (more as well but that will be a different blog).  Get-Member is getting that inform...

FAQDOCUMENTATIONTYPEEXTENSION