Showing results for FAQ - PowerShell Team

Sep 2, 2006
0
0

BizTalk Server Applications: Get/Start/Stop

PowerShell Team
PowerShell Team

Tomas Restrepo has a nice script for getting/starting/stoping BizTalk Server Applications at: http://www.winterdom.com/weblog/2006/09/02/BTSResetWithPowerShell.aspx I like how readable it the script is.  It is completely obvious what is going on.  Compare that script with his original C# implementation at: http://www.winterdom.com/weblog/...

FAQTYPE:WMI
Aug 31, 2006
0
0

Writing and Reading info from Serial Ports

PowerShell Team
PowerShell Team

PSMDTAG:FAQ: How do I read/write data from a Serial Port? Writing to a Serial Port PS> [System.IO.Ports.SerialPort]::getportnames()COM3PS> $port= new-Object System.IO.Ports.SerialPort COM3,9600,None,8,onePS> $port.open()PS> $port.WriteLine("Hello world")PS> $port.Close()Reading from a Serial Port PS> $port= new-Object System.IO.Po...

FAQDOTNETSystem.IO.Ports.SerialPort
Aug 30, 2006
0
0

Background "jobs" and PowerShell

PowerShell Team
PowerShell Team

A lot of people have asked whegther Windows PowerShell can do UNIX job handling.  The paraphrase an old management salesperson joke, "YES - YOU can do UNIX job handling with Windows PowerShell" (which means you have to do it yourself).  Jim Truher shows you how in his latest blog entry: http://jtruher.spaces.live.com/Perso...

FAQJobs
Aug 5, 2006
0
0

More Windows PowerShell Training Available

PowerShell Team
PowerShell Team

Don Jones, of ScriptingAnswers.com, is holding two two-day classes on Windows administrative scripting in Chicago and Seattle this September. While the first day of each class will focus on advanced VBScript techniques, the second day will be entirely devoted to Windows PowerShell. No prior PowerShell experience is necessary—Don plans to start from...

FAQTraining
Aug 2, 2006
0
0

Joel-On-Software on the power of a good language

PowerShell Team
PowerShell Team

Joel Spolsky of Joel-On-Software fame, just posted a blog, "Can Your Programming Language Do This?" http://www.joelonsoftware.com/items/2006/08/01.html In this article, he drives home the point that when it comes to code: Maintainability, Readability, Abstraction == Good!  He then points out how languages can help or hinder this and goes on to...

FAQLANGUAGE
Aug 1, 2006
0
0

ScriptCenter EventLog Article

PowerShell Team
PowerShell Team

ScriptCenter has a very good article exploring the use of Windows PowerShell to analyze your eventlogs.  Check it out at: http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/get-eventlog.mspx PSMDTAG:CMDLET: Get-EventLog PSMDTAG:FAQ: EventLog - How do I find out what event logs exist?  ANSWER: Get-EventLog -list PSMDTAG:...

FAQGet-EventLog
Aug 1, 2006
0
0

Encoding Operations Knowledge

PowerShell Team
PowerShell Team

One of the primary goals of Windows PowerShell is to encode operations knowledge.   Consider the example of finding out what domain role a computer plays.  If you look at the WMI class WIN32_COMPUTERSYSTEM, you'll see that it tells you this information:   PS> Get-WMiObject Win32_computerSystem |fl dom*Domain  &...

FAQPHILOSOPHYWMI
Jul 31, 2006
0
0

Why do I sometimes get different types?

PowerShell Team
PowerShell Team

PSMDTAG:FAQ: Why do I sometimes get different types or different behaviors? PSMDTAG:FAQ: When I pipe a heterogenous set of objects to an cmdlet that expects a homogenous stream - what happens and why? In our newgroup ( Microsoft.public.Windows.PowerShell ), Alex A asked these questions with the following example: cd c:\temp$( gci ; gci hkcu:\ ) | ...

FAQINTERNALTypes
Jul 31, 2006
1
0

Suppressing return values in PowerShell functions

PowerShell Team
PowerShell Team

PSMDTAG:FAQ: How do I supress return values in PowerShell functions? This was asked in a newgroup with the clarification: What I mean is:When you call a function Foo that returns a bool, PS will write 'True' or 'False' to the screenby default. Is there anyway to get it to stop writing those return values? Let's illustrate the issue: PS> functio...

FAQFunctionsReturn Values
Jul 24, 2006
0
0

Casting a scriptblock to an arbitrary delegate signature

PowerShell Team
PowerShell Team

Arild asked the following in http://arildf.spaces.msn.com/blog/cns!E99F8B43533149B0!140.entry?_c%3dBlogPart : PSMDTAG:FAQ: Delegates - how to cast a scriptblock to an arbitrary delegate signature? ANSWER - You can't in V1.0. In version 1.0 Windows PowerShell only supports casting scriptblocks to delegates with the signature: vo...

FAQDOTNETScriptBlock