Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » FAQ   (RSS)

Installing PowerShell on Vista/"Longhorn" Server

1. I am new to PowerShell and would like to install it on my Vista machine. The following page http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx gives you links to various PowerShell downloads. Choose the one
Posted by PowerShellTeam | 10 Comments
Filed under:

Why Can’t I Pipe Format-Table to Export-Csv (and get something useful)?

Ken's PowerShell blog has an entry Remote Services and PowerShell where he wrote a function to get services from a remote machine using WMI. He formatted the data using FT (format-table) and then went on to export the data to CSV. He pointed out that
Posted by PowerShellTeam | 8 Comments
Filed under:

Why isn’t “New-Object” aliased to “New”

Alistair Young made a Note to Self : In a standard PowerShell installation, "new" is not an alias for "new-object". You added that. You should therefore know better that to make this kind of dumbass mistake. We talked about making "New" an alias to "New-Object"
Posted by PowerShellTeam | 7 Comments
Filed under:

PowerShell Cheat Sheet Redux - the PDF version

Attached is a PDF version of Ben Pearce's PowerShell Cheat Sheet. In the past I've encouraged everyone to speak up and complain if we were messing up or not giving you what you needed. I'm pleased to see that you have taken this to heart (seriously).
Posted by PowerShellTeam | 8 Comments
Filed under:

Attachment(s): Cheat Sheet V1.00.pdf

PowerShell Cheat Sheet

Ben Pearce was gracious enough to put together a good looking PowerShell Cheat Sheet which I've included as an attachment to this blog post. By definition, a cheat sheet is incomplete so this contains the things that Ben has found to be the most import.
Posted by PowerShellTeam | 38 Comments
Filed under:

Attachment(s): Cheat Sheet V1.00.docx

Windows PowerShell Exit Codes

Windows PowerShell Exit Codes PSMDTAG:FAQ: How can my script control the PowerShell exit code? Answers: 1. A normal termination will set the exitcode to 0 2. An uncaught THROW will set the exitcode to 1 3. The EXIT statement will stop the process and
Posted by PowerShellTeam | 5 Comments
Filed under:

The Wonders of Date Math using Windows PowerShell

Larry Hayden posted a query about dates at: http://techtasks.com/bookmarks/powershell/2006/09/interview-with-a-scripter-jeffrey-snover/ He has a script which gets all the Application Events that happened TODAY: ———————————————————— $today = [DateTime]::Today
Posted by PowerShellTeam | 5 Comments
Filed under: ,

ErrorLevel equivalent

PSMDTAG:FAQ: ErrorLevel - what is the PowerShell equivalent? In Cmd.exe, %ErrorLevel% is a builtin variable which indicates the success or failure of the last executable run. In PowerShell, we support: $? Contains True if last operation succeeded and

DateTime Utility Functions

I often want to find things that happened Today. For instance, which files got changed today. Windows PowerShell makes this easy to do but it can be a bit verbose and I do it a lot so I've added a function to my profile: IsToday. function isToday ([datetime]$date)
Posted by PowerShellTeam | 6 Comments
Filed under: , , ,

BizTalk Server Applications: Get/Start/Stop

Tomas Restrepo has a nice script for getting/starting/stoping BizTalk Server Applications at: ht tp://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
Posted by PowerShellTeam | 1 Comments
Filed under: ,

Writing and Reading info from Serial Ports

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

Background "jobs" and PowerShell

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
Posted by PowerShellTeam | 2 Comments
Filed under: ,

More Windows PowerShell Training Available

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
Posted by PowerShellTeam | 0 Comments
Filed under: ,

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

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,
Posted by PowerShellTeam | 12 Comments
Filed under: ,

ScriptCenter EventLog Article

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
Posted by PowerShellTeam | 5 Comments
Filed under: ,
More Posts Next page »
 
Page view tracker