<![CDATA[Article Comments for Don Jones]]>http://www.windowsitpro.com/authors/author/author/5737979/rsscomment/5737979en-USSun, 27 May 2012 07:09:58 GMTSun, 27 May 2012 07:09:58 GMTGetting Started with PowerShellhttp://www.windowsitpro.com/article/windows-powershell/powershell-getting-started-142467#commentsAnchorTue, 22 May 2012 13:09:12 GMT
since debut of Powershell four full years passes and we still have Powershell basics training.What a shame for all Powershell suporters! Listen to us fellas! We don't need no new command shell. We don't need cryptic commands. We don't need a command-line-biased Microsoft! All we is GUI. Our OS is named Windows, do you remember?]]>
murat yildirimogluTue, 22 May 2012 13:09:12 GMThttp://www.windowsitpro.com/article/windows-powershell/powershell-getting-started-142467#commentsAnchor
Guest Post: FacebookPSModule -- Managing Facebook in PowerShellhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/guest-post-142115#commentsAnchorFri, 03 Feb 2012 12:13:51 GMT
]]>
teste xssFri, 03 Feb 2012 12:13:51 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/guest-post-142115#commentsAnchor
Tricks with Test-Connectionhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/tricks-testconnection-ping-141908#commentsAnchorWed, 01 Feb 2012 15:10:39 GMT
I tried this just yesterday actually to test if a server was available with just the boolean. It seemed to go much slower than the standard $ping.send() that I have used before and that I see a lot of others use. Would you say or is it your experience that for test servers liveliness in bulk this is slower than the often used $ping.send() stuff?]]>
CRadWed, 01 Feb 2012 15:10:39 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/tricks-testconnection-ping-141908#commentsAnchor
Learn PowerShell. Tell the World. Get a Free Book.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchorTue, 24 Jan 2012 12:45:58 GMT
Ready to learn PowerShell and will give you at least one hour everyday. Please send me the instruction. Thanks, Sanjay]]>
Sanjay PatelTue, 24 Jan 2012 12:45:58 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchor
Have a PowerShell Question? Ask Me!http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-question-141136#commentsAnchorSun, 22 Jan 2012 12:49:01 GMT
Hello Jon I just started "Learn Powershell in a month of lunches". On p. 13 the command Dir | More doesn't work in Powershell ISE even as administrator. I can get it to work in the standard Powershell though. Is it not possible in Powershell ISE? I would like to use this version but if it has these problems I better stick to Powershell itself. Thanks i n advance Peter]]>
peeweekeSun, 22 Jan 2012 12:49:01 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-question-141136#commentsAnchor
Learn PowerShell. Tell the World. Get a Free Book.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchorFri, 20 Jan 2012 13:31:17 GMT
Greetings, Is it too late? I am interested.]]>
junesbFri, 20 Jan 2012 13:31:17 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchor
Learn PowerShell. Tell the World. Get a Free Book.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchorTue, 17 Jan 2012 09:47:24 GMT
Just the new year's challenge I've been waiting for, Count me in. ]]>
doublecapsTue, 17 Jan 2012 09:47:24 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchor
Learn PowerShell. Tell the World. Get a Free Book.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchorTue, 17 Jan 2012 08:11:05 GMT
Need to learn Powershell]]>
Dan JasTue, 17 Jan 2012 08:11:05 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchor
Learn PowerShell. Tell the World. Get a Free Book.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchorMon, 16 Jan 2012 19:32:18 GMT
I'm ready to roll with it so lets gets started. I will give you one hour a day during the weekdays for a month. Ready for your instructions. Turk]]>
882turkMon, 16 Jan 2012 19:32:18 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-world-free-book-141921#commentsAnchor
Making PowerShell Paramshttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/making-powershell-params-141813#commentsAnchorThu, 12 Jan 2012 14:21:05 GMT
Don, I have just started reading your "powershell in a month of lunches" book. Our school system is the very first K12 system to go to Microsofts Office 365 online and powershell is going to be really useful for us so i am excited to learn more. I am really having a hard time with the "positional parameters" in chapter 3. ]]>
mdthomp38Thu, 12 Jan 2012 14:21:05 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/making-powershell-params-141813#commentsAnchor
Database Access within PowerShellhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/database-access-within-powershell-137405#commentsAnchorSat, 07 Jan 2012 02:34:10 GMT
Another good SQL tutorial is at http://www.1keydata.com/sql/sql.html]]>
oldcatSat, 07 Jan 2012 02:34:10 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/database-access-within-powershell-137405#commentsAnchor
Fun Tricks with Format-Table and Selecthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/fun-tricks-with-format-table-and-select-137400#commentsAnchorWed, 21 Dec 2011 14:25:58 GMT
Good stuff, man. Renaming headers helps the end user. When I used format-table with compare-object in my script I was getting errors (don't remember the error now) until I added out-string. Thank you. ]]>
AKWed, 21 Dec 2011 14:25:58 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/fun-tricks-with-format-table-and-select-137400#commentsAnchor
New Year's Resolution: How to Learn PowerShell in 2012http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/years-resolution-learn-powershell-2012-141420#commentsAnchorTue, 20 Dec 2011 03:51:55 GMT
fear, uncertainty and doubt! Bad marketing for your products Don.]]>
murat yildirimogluTue, 20 Dec 2011 03:51:55 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/years-resolution-learn-powershell-2012-141420#commentsAnchor
Learn PowerShell in Free Online Workshops this Novemberhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-free-online-workshops-november-141135#commentsAnchorThu, 03 Nov 2011 08:11:51 GMT
Oops. Login page gives a 404 not found :(]]>
aclark007Thu, 03 Nov 2011 08:11:51 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-free-online-workshops-november-141135#commentsAnchor
Learn PowerShell in Free Online Workshops this Novemberhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-free-online-workshops-november-141135#commentsAnchorWed, 02 Nov 2011 16:22:12 GMT
The powershellacademy.com doesn't seem to have any content on it.]]>
victorlmartinWed, 02 Nov 2011 16:22:12 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/learn-powershell-free-online-workshops-november-141135#commentsAnchor
PowerShell v3: Graphically complete commandshttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-graphically-complete-commands-140702#commentsAnchorThu, 13 Oct 2011 18:42:49 GMT
This another proof that we can not afford doing things without the GUI]]>
RedaThu, 13 Oct 2011 18:42:49 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-graphically-complete-commands-140702#commentsAnchor
Here's What PowerShell is All Abouthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchorWed, 12 Oct 2011 14:50:45 GMT
If you only have a hammer, every problem looks like a nail. I predict that PowerShell skills will separate the men from the boys. Maybe that's why so many feel threatened by it. ]]>
Laura McGlincheyWed, 12 Oct 2011 14:50:45 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchor
PowerShell v3: Robust Sessionshttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-robust-sessions-140700#commentsAnchorMon, 10 Oct 2011 16:59:00 GMT
Nice feature, but why they don't just keep the version number and update v.2 by replacing the old one. Most people can not follow the quick change in development. it's haaaaaaaaaard]]>
RedaMon, 10 Oct 2011 16:59:00 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-robust-sessions-140700#commentsAnchor
PowerShell v3: Autoloading Moduleshttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-autoloading-modules-140699#commentsAnchorMon, 10 Oct 2011 16:53:47 GMT
Start getting tired of Microsoft releasing on version after another of its products, as soon you start learning one version you find it too late, because a newer version is already out. I have just bought a couple of books dealing with PowerShell v.2 now MS is releasing PowerShell v.3, The same story with Windows OS.]]>
RedaMon, 10 Oct 2011 16:53:47 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-autoloading-modules-140699#commentsAnchor
Getting configurations for physical network adaptershttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/configurations-physical-network-adapters-140653#commentsAnchorFri, 07 Oct 2011 10:16:33 GMT
Both ways don't process particularly fast. If you're looking for more speed, this quick and dirty function should help. function Get-PhysicalNetAdapterConfiguration { [CmdletBinding()] param ( [Parameter(Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [Alias('Name')] [string]$ComputerName = '.' ) process { try { $netAdapters = Get-WmiObject -Class Win32_NetworkAdapter -Filter "PhysicalAdapter = '$true' " -ComputerName $ComputerName -ErrorAction Stop } catch { return Write-Error $_ } foreach ($netAdapter in $netAdapters) { $netAdapter.GetRelated('Win32_NetworkAdapterConfiguration') } } # process } ]]>
Rich KusakFri, 07 Oct 2011 10:16:33 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/configurations-physical-network-adapters-140653#commentsAnchor
Getting configurations for physical network adaptershttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/configurations-physical-network-adapters-140653#commentsAnchorThu, 06 Oct 2011 18:49:39 GMT
Great tip Don. Here's another way requiring a bit less typing. Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Where-Object {$_.GetRelated() | Select-Object -ExpandProperty PhysicalAdapter} ]]>
Rich KusakThu, 06 Oct 2011 18:49:39 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/configurations-physical-network-adapters-140653#commentsAnchor
Here's What PowerShell is All Abouthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchorFri, 30 Sep 2011 14:48:58 GMT
@Karl I really like the GUI tools provided by Microsoft and their vendors. Using PowerShell has not resulted in me giving any of them up. Why are all these vendors and Microsoft investing in PowerShell? Because it is an automation engine, probably the best one on the planet at this point int time. Look at what is coming in Server 8. There is a server manager that runs on your desktop, it is a GUI. You can apply changes to a single server or a hundred servers at the same time. Sounds great. Why are they able to do that now, something like 30 years into their enterprise experience? Because of what they have behind the GUI - PowerShell and supporting technologies. Now you can take either approach; use the GUI or the command line. Microsoft is committed to both. In my opinion, Don is absolutely right on this point.]]>
olathemikeFri, 30 Sep 2011 14:48:58 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchor
Here's What PowerShell is All Abouthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchorThu, 29 Sep 2011 15:33:51 GMT
@ Karl "Pull your head out of the sand"? If you don't like PowerShell... Simply don't use it. If you're still stuck on "everything" going to the CLI, then you should re-read the article.]]>
Marco ShawThu, 29 Sep 2011 15:33:51 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchor
Preview: PowerShell SEhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchorThu, 29 Sep 2011 07:14:04 GMT
PowerShell SE 2.0 has been released as freeware. Enjoy!]]>
Alexey MartseniukThu, 29 Sep 2011 07:14:04 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchor
PowerShell v3: Simplified.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-simplified-140614#commentsAnchorWed, 28 Sep 2011 17:28:58 GMT
I'm so in the habit of quoting strings (blame VBScript) that I often forget that - thanks for the reminder, Bartek!]]>
Don JonesWed, 28 Sep 2011 17:28:58 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-simplified-140614#commentsAnchor
Here's What PowerShell is All Abouthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchorWed, 28 Sep 2011 17:26:21 GMT
I *always* listen to my critics. I just reserve the right to disagree with them! Thanks for commenting, Karl!]]>
Don JonesWed, 28 Sep 2011 17:26:21 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchor
Here's What PowerShell is All Abouthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchorWed, 28 Sep 2011 14:17:16 GMT
Listen to your critics. To be blunt, pull your head out of the sand.]]>
karl snooksWed, 28 Sep 2011 14:17:16 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-bitterness-sweeps-nation-140744#commentsAnchor
PowerShell v3: Simplified.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-simplified-140614#commentsAnchorThu, 22 Sep 2011 15:48:07 GMT
I would say it's even easier that that - because pattern is just positional argument you do not need to quote it: Get-Process | where Name -like *power* ls | where Name -match ^test.* Gotta love that. ;)]]>
Bartek BielawskiThu, 22 Sep 2011 15:48:07 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-simplified-140614#commentsAnchor
What To Do / Not to Do in PowerShell: Part 4http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/what-to-do--not-to-do-in-powershell-part-4-137480#commentsAnchorFri, 12 Aug 2011 18:53:11 GMT
Hi Don, I really appreciate your tips and training material. I believe that in one of your training videos you mentioned that yes, we should spell out cmdlet names but that it's an acceptable practice to shorten the popular "-Object" ones like: Where-Object, ForEach-Object, Select-Object, to just the verb. Did I understand that right? Shortening those often seems to make my code read easier. Thanks! Rich]]>
Rich KusakFri, 12 Aug 2011 18:53:11 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/what-to-do--not-to-do-in-powershell-part-4-137480#commentsAnchor
What To Do / Not to Do in PowerShell: Part 12http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-12-139695#commentsAnchorThu, 11 Aug 2011 19:53:51 GMT
Don, I think you are missing a @ in your example]]>
johngullionThu, 11 Aug 2011 19:53:51 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-12-139695#commentsAnchor
What To Do / Not to Do in PowerShell: Part 10http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-10-139693#commentsAnchorMon, 25 Jul 2011 12:16:09 GMT
Awesome series with some great tips that I need to start paying attention to. My only concern is that each tip doesn't have a direct link to the next tip in the series. The "Related Content" section doesn't always, either. Makes following the tips from the beginning a little difficult.]]>
58sniperMon, 25 Jul 2011 12:16:09 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-10-139693#commentsAnchor
Guest Article: I just wanna go home, so I use PowerShell Remoting!http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/wanna-home-powershell-remoting-139723#commentsAnchorMon, 25 Jul 2011 03:29:58 GMT
Hi Jason, Thanks for this article on PowerShell Remoting. Maybe you should also add some info on the Throttelimit parameter. Invoke-command is one of the cmdlets supporting the Throttlelimit parameter. Commands can be throttled which limits the amount of concurrent connections. Get-Help * -parameter Throttlelimit /Stefan Stranger Microsoft]]>
Stefan StrangerMon, 25 Jul 2011 03:29:58 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/wanna-home-powershell-remoting-139723#commentsAnchor
What To Do / Not to Do in PowerShell: Part 9http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-9-139692#commentsAnchorWed, 20 Jul 2011 15:04:31 GMT
We used to sign our scripts, to follow best practice. Process and Certificate overhead seemed manageable for a single team to 50 assets. When we had to teach our SA team on PowerShell and script-signing, it didn't go well. Politics ensued. The arguments that one could copy the script contents, paste it interactive into a console, and run it anyway, so the signing stops little. There's no end user access to the box, only SA and systems integrators. Those people will either be diligent, or they won't. When we say unsigned scripts are stopped from automatically being kicked off, they argue back that the testing cycle on non-live systems is where scripts should be tested. We say yes, but what if that script makes it to a live system? Then the argument goes back to diligence, human error, and the balance between getting stuff done, and going through a process with questionable benefit. Results so far, we have 100s of assets now, and we haven't seen a difference between signing and not-signing. Both teams play nice, and there are go to people to review and test scripts. There's no signing, and there is some script on the fly to put out fires - which has come in useful. Signing has questionable value in our situation, and everyone should evaluate their own situation. For cases more complex than ours, I'm glad signing is an available option.]]>
BewcWed, 20 Jul 2011 15:04:31 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-9-139692#commentsAnchor
What To Do / Not to Do in PowerShell: Part 9http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-9-139692#commentsAnchorTue, 19 Jul 2011 17:23:49 GMT
I work in a company that uses the AllSigned execution policy and there are very few people in the organisation doing anything with Powershell, but I still won't sign anything that I've uploaded to anywhere for someone else to use. If it's useful enough for me to upload (to wherever) and I've got it signed, I'll go as far as removing the signature before I upload it to anywhere. We have pretty comprehensive and easy to follow instructions readily available inside the organisation showing how to download and unblock a script and also how to obtain/create a codesigning certificate and sign a script. My reasoning is that anyone downloading any script written by anyone else should really give it a check over and 'validate' the fact that they're happy that it's non-malicious before they run it. My not signing published scripts forces the powershell curious to do that with any scripts that I've written before they can run them. It also forces me to have a good look through anything I get from them or elsewhere, and it's not been totaly unknown for me to 'learn something' whilst casting a cursory eye over someone elses code...]]>
cmcknz77Tue, 19 Jul 2011 17:23:49 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-9-139692#commentsAnchor
What To Do / Not to Do in PowerShell: Part 9http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-9-139692#commentsAnchorTue, 19 Jul 2011 12:56:16 GMT
You don't even need a commercial script editor to do this. PowerGUI supports script signing, and it's free. You just need to install the optional Script Signing Add-on to enable this functionality, and then signing scripts is just a click away! Kirk out.]]>
Tue, 19 Jul 2011 12:56:16 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-9-139692#commentsAnchor
What To Do / Not to Do in PowerShell: Part 9http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-9-139692#commentsAnchorTue, 19 Jul 2011 11:49:15 GMT
We decided early on that we would require signed scripts inside the organization. Our CA issues code signing certs and we use GPO to trust signers. Its almost trivial once you understand it. (It helps that I'm the only one writing these things) Quesiton - do you/would you require all internal code to be signed (.Net, etc) ]]>
Tue, 19 Jul 2011 11:49:15 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-part-9-139692#commentsAnchor
Guest Article: I just wanna go home, so I use PowerShell Remoting!http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/wanna-home-powershell-remoting-139723#commentsAnchorTue, 19 Jul 2011 11:48:51 GMT
If you enjoy Powershell Remoting, you gonna love RemoteExec Jason: http://www.RemoteExec.com ...]]>
Tue, 19 Jul 2011 11:48:51 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/wanna-home-powershell-remoting-139723#commentsAnchor
Cool Trick if You Use Sequential Server Nameshttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/cool-trick-sequential-server-names-139517#commentsAnchorMon, 04 Jul 2011 14:38:38 GMT
reverse an array? $arr = @("tom","dick","harry","darrel") $arr = $arr[$arr.Length..0] ]]>
Ross MeeksMon, 04 Jul 2011 14:38:38 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/cool-trick-sequential-server-names-139517#commentsAnchor
Revisiting FastTrack Script Hosthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/revisiting-fasttrack-script-host-139598#commentsAnchorTue, 28 Jun 2011 20:25:34 GMT
Excellent review mate ;-) Im a system administrator and no matter how hard I was trying to avoiding starting to learn PowerShell, now I can clearly see true value in your phrase: learn PowerShell, or would you like fries with it? PowerShell just everywhere! By the way, just started chapter 4 from your book Learn Windows PowerShell in a month of lunches. Learning PowerShell is not hard at least at the beginning, the hardest part is to find time to learn it. Yes, true, systems admins like me very often dont have a time to learn new language (Im taking about vbscrips and PowerShell here) but the job needs to be done like "last week". That is way we looking for a shortcut like FastTrack or other similar products on the market. Your article just save me hours on not to waste my time on installing, setting up and learning something I dont really need. Im re-phrasing your statement about wrapped-around-PowerShell time-savers here: If I knew how to, I'd launch a business to sell just that! Would be interesting to read your review (if you have any) about User Management Resource Administrator (UMRA) from www.tools4ever.com PS. By any chance you will be at the Tech-Ed Australia 2011in Aug-Sep?]]>
LeonskiTue, 28 Jun 2011 20:25:34 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/revisiting-fasttrack-script-host-139598#commentsAnchor
ForEach Makes me Die a Little Insidehttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/foreach-die-139507#commentsAnchorTue, 21 Jun 2011 15:36:41 GMT
| "JRV, I'm gonna pick on you a bit" | "Now, I'm not picking on JRV" ]]>
JerryHolguinTue, 21 Jun 2011 15:36:41 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/foreach-die-139507#commentsAnchor
Q. Do normal Windows commands run in PowerShell?http://www.windowsitpro.com/article/powershell-faqs/q-do-normal-windows-commands-run-in-powershell#commentsAnchorTue, 31 May 2011 08:35:56 GMT
Not exactly. here’s what i tried followed by the error: &"sc query w3svc" The term ’sc query w3svc’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:2 + & <<<< "sc query w3svc" + CategoryInfo : ObjectNotFound: (sc query w3svc:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException]]>
elisagieTue, 31 May 2011 08:35:56 GMThttp://www.windowsitpro.com/article/powershell-faqs/q-do-normal-windows-commands-run-in-powershell#commentsAnchor
Breaking Lines in PowerShell: Lose the Backtickhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/breaking-lines-in-powershell-lose-the-backtick-137482#commentsAnchorSat, 28 May 2011 05:54:13 GMT
I was very encouraged to find this site. I wanted to thank you for this special read. I definitely savored every little bit of it.


Vishal Mittal Architect ]]>
anahillsSat, 28 May 2011 05:54:13 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/breaking-lines-in-powershell-lose-the-backtick-137482#commentsAnchor
FastTrack: "Complete Replacement for PowerShell?"http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/fasttrack-complete-replacement-for-powershell-137415#commentsAnchorThu, 12 May 2011 06:12:11 GMT
Wow Wallen, I have to agree with that, wish I could edit a comment statement you made. I wish I had proof read it better too.

last full line first paragraph should be "..., you look" not "lood"

last line of post should be "Am I..." not "I am"]]>
joshdarrThu, 12 May 2011 06:12:11 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/fasttrack-complete-replacement-for-powershell-137415#commentsAnchor
FastTrack: "Complete Replacement for PowerShell?"http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/fasttrack-complete-replacement-for-powershell-137415#commentsAnchorThu, 12 May 2011 06:08:48 GMT
Don,

It is a bit off topic for posting here, but not sure how else to reach you.
In the article above you mention logon scripts being (largely) replaced or simplified by GPOs and GP Prefs, I have to say I disagree with that, specifically with some of the examples you cite. Having said that maybe I am missing something, you lood at this stuff all the time, I am just an admin in a small company so my time to evaluate these things is slim.

To provide one simple example, drive mappings in GP Prefs cannot be effectively used in my environment (and I suspect many others) if you want to be able to provide mappings when users log in to their local system not connected to the corporate network via software VPN for example. Since much like the call a "logon script" functionality in Windows the drive map function of a GP Pref process must occur at machine log on...WHY????!!!! I can use a script to map a drive anytime.

I am way off base...?]]>
joshdarrThu, 12 May 2011 06:08:48 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/fasttrack-complete-replacement-for-powershell-137415#commentsAnchor
What To Do / Not to Do in PowerShell: Part 1http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/what-to-do--not-to-do-in-powershell-part-1-137475#commentsAnchorFri, 06 May 2011 11:11:46 GMT
You left off the part about Eternal Damnation for using Write-Host! :)]]>
CarlWebsterFri, 06 May 2011 11:11:46 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/what-to-do--not-to-do-in-powershell-part-1-137475#commentsAnchor
What To Do / Not to Do in PowerShell: Part 1http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/what-to-do--not-to-do-in-powershell-part-1-137475#commentsAnchorFri, 06 May 2011 10:38:25 GMT
This sounds familiar - oh yeah, from your class!

I’ve used these techniques to completely remove Write-Host from my scripts, and it’s much for the better. Most of what I was wanting to output to the screen was replaced with Write-Verbose, and it really makes a great difference in the execution of them.

Thanks for sharing this]]>
Michael SimmonsFri, 06 May 2011 10:38:25 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/what-to-do--not-to-do-in-powershell-part-1-137475#commentsAnchor
Why PowerShell Isn't VBScript or KiXtarthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/why-powershell-isnt-vbscript-or-kixtart-137353#commentsAnchorWed, 27 Apr 2011 04:36:23 GMT
Oh the dreaded hidden extension, I can’t count the number of times this has happened to me, you will spend hours racking your brains trying to figure out what is wrong and after all that its always something simple like these hidden extensions. At the end you don’t know whether to cry because it was something so stupid or just thanks God that you got it working. Really enjoyed the post and hopefully I can make use of some of your suggestions
Neil
http://emobilescan.pl]]>
Neil JWed, 27 Apr 2011 04:36:23 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/why-powershell-isnt-vbscript-or-kixtart-137353#commentsAnchor
Is there an "Option Explicit" in PowerShell?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-there-an-option-explicit-in-powershell-137468#commentsAnchorThu, 14 Apr 2011 13:03:19 GMT
Phil: You’ll want to ask over at PowerGUI.org. They wrote those cmdlets and know a ton more about them than I do! But my guess is probably not without reprogramming the cmdlet.

]]>
Don JonesThu, 14 Apr 2011 13:03:19 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-there-an-option-explicit-in-powershell-137468#commentsAnchor
Is there an "Option Explicit" in PowerShell?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-there-an-option-explicit-in-powershell-137468#commentsAnchorWed, 13 Apr 2011 11:44:23 GMT
Hi Don,
the solution that might be offered is to declare every variable with its type like

for([int]$private:i = 0; $private:i -lt 10; $private:i++)
{
Write-Host $private:i;
for([int]$private:i2 = 0; $private:i2 -lt 10; $private:i2++)
{
Write-Host $private:i2;
}
}

but foreach, for example, does not support this way (it’s a flaw compared to C#):
$env:Path.Split(";") | %{[String[]]$var = Get-ChildItem -Path $_}
foreach([string]$file in $var)
{Write-Host $file;}]]>
Alexander PetrovskiyWed, 13 Apr 2011 11:44:23 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-there-an-option-explicit-in-powershell-137468#commentsAnchor
Is there an "Option Explicit" in PowerShell?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-there-an-option-explicit-in-powershell-137468#commentsAnchorTue, 12 Apr 2011 02:39:50 GMT
Hi Don,

I put this in my PS profile, as I was sick on mispelling my variables and having to debug my scripts. That was great for about 10 minutes....

as a result, my script for Exchange mailbox sizes stopped running due to a .count property which did not exist on a single user. I run $myUsers get-qaduser (scripts param) and I then check for $myUsers.count. if this is > 1 then I give the user a list of users return to select from. This now fails as a single user does not have a count property.

Are you aware of any way to ensure that a get-qaduser command ALWAYS returns collection and not a sinlge object ?

Thanks

Phil]]>
Phil DaltonTue, 12 Apr 2011 02:39:50 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-there-an-option-explicit-in-powershell-137468#commentsAnchor
Is This an ADVANCED PowerShell Book You'd Read?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-this-an-advanced-powershell-book-youd-read-137450#commentsAnchorFri, 11 Mar 2011 14:31:27 GMT
Would definitely take a look at this - more about jobs would be awesome.]]>
OwenFri, 11 Mar 2011 14:31:27 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-this-an-advanced-powershell-book-youd-read-137450#commentsAnchor
You can fix and improve PowerShell. Really.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/you-can-fix-and-improve-powershell-really-137462#commentsAnchorThu, 10 Mar 2011 23:15:01 GMT
That is absolutely correct. We want to hear from you. This is YOUR product! We get paid to make YOU successful. Tell us what you is giving you grief so that we have an opportunity to fix it.

Jeffrey Snover [MSFT]
Distinguished Engineer
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
]]>
jsnoverThu, 10 Mar 2011 23:15:01 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/you-can-fix-and-improve-powershell-really-137462#commentsAnchor
A PowerShell Challenge (win a free book!)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchorThu, 10 Mar 2011 22:52:10 GMT
Don
I must say I’m bit... surprised. ;) In very first sentence that describe rules of challenge you’ve mentioned that one should use pure v2 on w2k8r2, without anything _installed_ or _loaded_. I was sure that was about quest snappin (install/ load)/ ms module (same story if not on DC). Now I’m confused, cause it makes all ADSI solutions... well... waste of effort. ;)]]>
Bartek BielawskiThu, 10 Mar 2011 22:52:10 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchor
Getting Computer Names into a Cmdlethttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/getting-computer-names-into-a-cmdlet-137460#commentsAnchorThu, 10 Mar 2011 15:22:28 GMT
There is also one more technique that I’ve learned on VUG (FreeNode #PowerShell IRC channel), that allows you to use scriptblock for parameters that read from pipe and use $_ there and properties of the object:
Get-ADComputer -Filter * | Test-Connection -ComputerName { $_.Name } -Count 1
Really nice for working with AD results. :)]]>
Bartek BielawskiThu, 10 Mar 2011 15:22:28 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/getting-computer-names-into-a-cmdlet-137460#commentsAnchor
A PowerShell Challenge (win a free book!)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchorThu, 10 Mar 2011 12:54:00 GMT
Hi Don,

Did the problem number 2, here it is :

http://www.myexchangeworld.com/2011/03/powershell-challenge-problem-2/

Now working on others :)

cheers
thiyagu

]]>
ThiyaguThu, 10 Mar 2011 12:54:00 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchor
A PowerShell Challenge (win a free book!)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchorThu, 10 Mar 2011 12:47:57 GMT
You can use anything you like, including the ActiveDirectory module, the Quest AD cmdlets, .NET classes, black magic, whatever works.]]>
Don JonesThu, 10 Mar 2011 12:47:57 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchor
A PowerShell Challenge (win a free book!)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchorThu, 10 Mar 2011 11:37:44 GMT
Hi Don,
Can we use the AD-module?

cheers
Thiyagu]]>
ThiyaguThu, 10 Mar 2011 11:37:44 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchor
A PowerShell Challenge (win a free book!)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchorWed, 09 Mar 2011 16:47:37 GMT
They’re using a real account, either domain or local - but not LocalSystem. Therefore, the services are configured with a password that they use to log on. When that account’s password is changed, the services need the updated password. That’s what this problem should solve - getting the updated password to the services. It doesn’t necessarily need to be an "AD Service Account." In fact, you don’t need to worry about what kind of account it is at all - the challenge is just about reconfiguring the password on the service. It isn’t LocalSystem or another special BUILTIN account, so there IS a password to be changed on the service’s configuration.]]>
Don JonesWed, 09 Mar 2011 16:47:37 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchor
A PowerShell Challenge (win a free book!)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchorWed, 09 Mar 2011 11:15:05 GMT
Dear Don, I’m not sure if I understand 1st problem - are those servers using local account for the service? Or should I assume that this service is AD Service Accounts feature - compatible, as IIS is?]]>
Bartek BielawskiWed, 09 Mar 2011 11:15:05 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-powershell-challenge-win-a-free-book-137459#commentsAnchor
Why no PowerShell certification from Microsoft?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/why-no-powershell-certification-from-microsoft-137457#commentsAnchorTue, 22 Feb 2011 13:43:58 GMT
Compelling argument! Real-world, practical, and hands-on, as well as peer-reviewed and community-involved.]]>
Don JonesTue, 22 Feb 2011 13:43:58 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/why-no-powershell-certification-from-microsoft-137457#commentsAnchor
Why no PowerShell certification from Microsoft?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/why-no-powershell-certification-from-microsoft-137457#commentsAnchorTue, 22 Feb 2011 10:16:23 GMT
Honestly? I think there is self-cert available already. Next exam - April 4 - 15. Now when there is only PowerShell division and beg and adv are separated it’s not really hard to say: I have cert, I got 2+ points from each event from recent Scripting Games. :D Or even better: I’m master, got average of 4 points. ;) Can not think of any other proof of PowerShell skills. ;)]]>
Bartek BielawskiTue, 22 Feb 2011 10:16:23 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/why-no-powershell-certification-from-microsoft-137457#commentsAnchor
Preview: PowerShell SEhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchorTue, 22 Feb 2011 01:07:50 GMT
Very good review, Don. You’ve highlighted some things I would have missed. Anyway - I think it’s good option to have this kind of product, such ’ISE editor on steroids’. And with ability to edit ps1xml (can’t wait!), something all free solution I know of lack, it may be great and powerful addition to ISE (which is present on all win7 machines unlike PowerGUI).]]>
Bartek BielawskiTue, 22 Feb 2011 01:07:50 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchor
A Concentrated Guide to PowerShell Functionshttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchorSun, 06 Feb 2011 15:06:28 GMT
Hi, not sure if I should be commenting to you Don or some website admin? I’ve been printing off a number of the PowerShell articles from WindowsITpro, so I have them all in one place for reference. (all very good articles by the way, thanks). I use the ’print’ option at top of article to get it all on one page.

This has a problem, however, with code snippets included in scrolling boxes - the only part that prints is the visible part, leaving off much important information.

For example, the snippet under Select-Object command above is:
Get-WmiObject -class Win32_OperatingSystem -computername Server-R2 | Select @{n=’ComputerName’;e={$_.__SERVER}},Caption,BuildNumber,ServicePackMajorVersion,@{n=’BIOSSerial’;e={Get-WmiObject -class Win32_BIOS -computername $_ | Select -expand SerialNumber}}

But when printed all I get is:
Get-WmiObject -class Win32_OperatingSystem -computername Server-R2 | Select @{n=’Comput

Thereby making it a bit useless once printed.

Is there anyway the website can expand these boxes to show the full code when the print option is selected?

Regards, Bryce Stenberg.]]>
StenbergSun, 06 Feb 2011 15:06:28 GMThttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchor
A Concentrated Guide to PowerShell Functionshttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchorThu, 03 Feb 2011 15:51:47 GMT
Hi, not sure if I should be commenting to you Don or some website admin? I’ve been printing off a number of the PowerShell articles from WindowsITpro, so I have them all in one place for reference. (all very good articles by the way, thanks). I use the ’print’ option at top of article to get it all on one page.

This has a problem, however, with code snippets included in scrolling boxes - the only part that prints is the visible part, leaving off much important information.

For example, the snippet under Select-Object command above is:
Get-WmiObject -class Win32_OperatingSystem -computername Server-R2 | Select @{n=’ComputerName’;e={$_.__SERVER}},Caption,BuildNumber,ServicePackMajorVersion,@{n=’BIOSSerial’;e={Get-WmiObject -class Win32_BIOS -computername $_ | Select -expand SerialNumber}}

But when printed all I get is:
Get-WmiObject -class Win32_OperatingSystem -computername Server-R2 | Select @{n=’Comput

Thereby making it a bit useless once printed.

Is there anyway the website can expand these boxes to show the full code when the print option is selected?

Regards, Bryce Stenberg.]]>
StenbergThu, 03 Feb 2011 15:51:47 GMThttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchor
A Concentrated Guide to PowerShell Functionshttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchorThu, 03 Feb 2011 15:50:40 GMT
Hi, not sure if I should be commenting to you Don or some website admin? I’ve been printing off a number of the PowerShell articles from WindowsITpro, so I have them all in one place for reference. (all very good articles by the way, thanks). I use the ’print’ option at top of article to get it all on one page.

This has a problem, however, with code snippets included in scrolling boxes - the only part that prints is the visible part, leaving off much important information.

For example, the snippet under Select-Object command above is:
Get-WmiObject -class Win32_OperatingSystem -computername Server-R2 | Select @{n=’ComputerName’;e={$_.__SERVER}},Caption,BuildNumber,ServicePackMajorVersion,@{n=’BIOSSerial’;e={Get-WmiObject -class Win32_BIOS -computername $_ | Select -expand SerialNumber}}

But when printed all I get is:
Get-WmiObject -class Win32_OperatingSystem -computername Server-R2 | Select @{n=’Comput

Thereby making it a bit useless once printed.

Is there anyway the website can expand these boxes to show the full code when the print option is selected?

Regards, Bryce Stenberg.]]>
StenbergThu, 03 Feb 2011 15:50:40 GMThttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchor
Preview: PowerShell SEhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchorThu, 03 Feb 2011 11:11:55 GMT
Don,
"...PowerShell ISE provides code editor (the same WPF text editor as Visual Studio 2010). Nothing more."
- I mean the PowerShell SE uses the WPF text editor from ISE and nothing more. And "a super-customized ISE" isn’t correct description. It’s two different applications based on the same WPF control. My bad, sorry.

"run selection" - executes the current line (line with cursor) when you don’t select anything.

It’s really nice preview,
Thank you.

BTW. Yes, ISE is super cool! I love this tool :)]]>
Alexey MartseniukThu, 03 Feb 2011 11:11:55 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchor
Preview: PowerShell SEhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchorThu, 03 Feb 2011 09:50:03 GMT
Alexey, I’ll disagree with your comment about the ISE. The ISE also provides integrated debugging, and in almost exactly the same way that your PowerShell SE does (line breakpoints only). It does a better job of providing variable values during a breakpoint, as well.

While it doesn’t provide an in-window help viewer, I think you need to have your viewer float outside the main window to make it truly useful and readable.

The ISE also provides an interactive command prompt, meaning I can quickly run commands to try them out. I realize you provide a "run selection" (as does the ISE), but from a working perspective having to type something, highlight it, and hit a hotkey is cumbersome.

You do provide IntelliSense, which the ISE lacks. However, as I’ve noted, someone can already get all of those features - and many more, and in most cases better-implemented - in other freely-available tools like PowerGUI.

I also realize, and indicated in the article, that PowerShell SE is in beta. I’m hoping that you continue to develop it, and to add features that take it beyond the ISE’s basic functionality. If you have plans in that direction, it might be nice to share them, so that people have an idea of what to expect from your tool going forward. ]]>
Don JonesThu, 03 Feb 2011 09:50:03 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchor
Preview: PowerShell SEhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchorWed, 02 Feb 2011 23:29:19 GMT
A few things I would like to note:
"...the editor does have the ability to save a colorized script to HTML."
- HTML & RTF http://powershelltools.com/images/se/pse_save.jpg

"...PowerShell SE is based on the built-in ISE, meaning it’s basically a super-customized ISE"
- PowerShell ISE provides code editor (the same WPF text editor as Visual Studio 2010). Nothing more.

Thanks anyway!]]>
Alexey MartseniukWed, 02 Feb 2011 23:29:19 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/preview-powershell-se-137453#commentsAnchor
SQL Server + PowerShell: Why? You Tell Me. Please.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchorMon, 31 Jan 2011 15:41:02 GMT
Could not agree more with Allen’s comment "We should never be focused on finding just one tool to solve our problems, but rely on the best tool for the job at hand."
As is the case with most scripting technologies, PowerShell scripts remain largely ’open source’ and prone to leaking sensitive info, unlike T-SQL code behind layers of server protection.
Unless this issue is addressed in subsequent releases of PowerShell, script authors will continue to find it hard or unsuitable for packaging, distributing or selling their service solutions, no matter how useful and powerful they may be.

Couldn’t PowerShell functions become T-SQL extensions, the way CLR functions can now be used in T-SQL?]]>
paperlessMon, 31 Jan 2011 15:41:02 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchor
PowerShell Environment Roundup: SAPIEN PrimalScripthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/powershell-environment-roundup-sapien-primalscript-137374#commentsAnchorTue, 25 Jan 2011 17:07:56 GMT
Sorry, Nicko, I don’t know - but I suspect not. You’d be best off asking SAPIEN themselves at http://support.sapien.com. ]]>
Don JonesTue, 25 Jan 2011 17:07:56 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/powershell-environment-roundup-sapien-primalscript-137374#commentsAnchor
Is This an ADVANCED PowerShell Book You'd Read?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-this-an-advanced-powershell-book-youd-read-137450#commentsAnchorTue, 25 Jan 2011 10:44:45 GMT
I would like to see WAY more info on remoting with WinRM.

A way to pass variables to and from a remote machines, would be nice (if possible).

Example:
Remote Registry and WMI Registry manuipulation is EXREMELY slow on some machines... especially if they are an old machine, on a slow connection, and enumerating something like:
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

So, a way to use WinRM to instruct the local Powerhell registry provider on that slow machine... would be much faster. In essence, there needs to be a way to pass and return variables for WinRM scripts. That way you can manipulate the Powershell Registry Provider as easlily as you can on your local machine.

I have not found any Powershell Material that really covers ***USING*** WinRM in depth (Including your CBT Nugget Videos).

Thanks for the opportunity to provide suggestions!]]>
WallenTue, 25 Jan 2011 10:44:45 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-this-an-advanced-powershell-book-youd-read-137450#commentsAnchor
Is This an ADVANCED PowerShell Book You'd Read?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-this-an-advanced-powershell-book-youd-read-137450#commentsAnchorTue, 25 Jan 2011 05:22:19 GMT
Considering that I’ve struggled with about half of those topics at my current customer - Yes, I’d definitely read it.

BTW, looking for a reviewer? ;-)]]>
Torbjorn BergstedtTue, 25 Jan 2011 05:22:19 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-this-an-advanced-powershell-book-youd-read-137450#commentsAnchor
A Concentrated Guide to PowerShell Functionshttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchorTue, 25 Jan 2011 02:26:51 GMT
There are 3 PS commandos with an } in the line but there is no "opening" { in these lines for the first closing }.
Is this a misspelling? Please give me some feedback
Here are the code lines:

Get-ADComputer -filter * -searchbase ’ou=West,dc=company,dc=com’ } | Select -expand Name | Get-OSInventory | Where { $_.OSBuild -eq 2600 -and $_.SPVersion -ne 3 }

and the second:
Get-ADComputer -filter * -searchbase ’ou=West,dc=company,dc=com’ } | Select -expand Name | Get-OSInventory | Export-CSV output.csv

und finally the third line:
Get-ADComputer -filter * -searchbase ’ou=West,dc=company,dc=com’ } | Select -expand Name | Get-OSInventory

Rainer Huttenloher

]]>
rhhTue, 25 Jan 2011 02:26:51 GMThttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchor
Is This an ADVANCED PowerShell Book You'd Read?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-this-an-advanced-powershell-book-youd-read-137450#commentsAnchorSun, 23 Jan 2011 05:45:16 GMT
Thank you for writing on advanced topics. I would like to see advanced Active Directory and ADLDS and advanced WMI scripting.]]>
michellewwgSun, 23 Jan 2011 05:45:16 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/is-this-an-advanced-powershell-book-youd-read-137450#commentsAnchor
Use PowerShell in Visual Studio?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/use-powershell-in-visual-studio-137448#commentsAnchorTue, 18 Jan 2011 10:45:44 GMT
Don,

I’m the guy behind the PowerGUI VSX and I just wanted to point out a few benefits of using PowerGUI in Visual Studio. The first being that you can debug binary modules by seamlessly stepping from PowerShell script to C#\VB.NET code. See my post here: http://csharpening.net/blog/?p=279 Another cool thing that was just added to the beta for 1.3 is access to the DTE (Visual Studio’s automation object). More on that here: http://csharpening.net/blog/?p=300

I also wanted to point out StudioShell: http://www.beefycode.com/post/Announcing-StudioShell.aspx

It will be a pretty cool addition and I think it will get a lot more people doing PowerShell in Visual Studio.

Adam]]>
Adam DriscollTue, 18 Jan 2011 10:45:44 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/use-powershell-in-visual-studio-137448#commentsAnchor
PowerShell Environment Roundup: SAPIEN PrimalScripthttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/powershell-environment-roundup-sapien-primalscript-137374#commentsAnchorWed, 12 Jan 2011 09:14:41 GMT
Many thanks for the great review.
I’m hoping my company will buy the licence. In VBScript is it possible for PrimalScript to debug into an external module? For example, code in file 1.vbs calls code in file 2.vbs (via ExecuteGlobal). Would be pretty neat if a breakpoint could be set in file 2.vbs]]>
nickoWed, 12 Jan 2011 09:14:41 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/powershell-environment-roundup-sapien-primalscript-137374#commentsAnchor
A Concentrated Guide to PowerShell Functionshttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchorWed, 12 Jan 2011 07:42:12 GMT
Forgot the "select" on your first command and I get blank output for "BIOSSerial" when using $_ in ’Get-WmiObject -class Win32_OperatingSystem -computername Server-R2 | Select @{n=’ComputerName’;e={$_.__SERVER}},Caption,BuildNumber,ServicePackMajorVersion,@{n=’BIOSSerial’;e={Get-WmiObject -class Win32_BIOS -computername $_ | Select -expand SerialNumber}}’]]>
Steven PlattWed, 12 Jan 2011 07:42:12 GMThttp://www.windowsitpro.com/article/windows-powershell/a-concentrated-guide-to-powershell-functions#commentsAnchor
SQL Server + PowerShell: Why? You Tell Me. Please.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchorSat, 08 Jan 2011 15:59:02 GMT
As I shared with Tom LaRock yesterday, there are tools appropriate to specific tasks, and no one tool solves all problems. Chad gave a list of great examples for using PowerShell to automate management. I regularly give a presentation where I show how to gather performance counters for both the Windows server and the SQL Server instances at the same time and store them in a database to build a performance baseline. This one task involves SMO, T-SQL and .NET into a single PowerShell script to perform a very useful service.

We should never be focused on finding just one tool to solve our problems, but rely on the best tool for the job at hand.]]>
AllenMWhiteSat, 08 Jan 2011 15:59:02 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchor
SQL Server + PowerShell: Why? You Tell Me. Please.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchorSat, 08 Jan 2011 15:00:24 GMT
The question of PowerShell for the DBA comes down — “Why should I learn Powershell when I have a pretty good set of tools in T-SQL, SSMS and SSIS." I’m avid PowerShell fan, but I would agree that in many cases T-SQL provides an ideal solution to SQL Server administration scripting problems, however there are certain scenarios where another tool, Powershell provides a more elegant solution including:

Multi-server Automation -- SSMS is great for one SQL Server, but it doesn’t scale to many
Retrieving Poperties is Easier -- Certain SMO classes and their associated properites provide an abstraction over some very complex T-SQL that is just easier to use with PowerShell + SMO.
Non-SQL tasks a DBA performs including retrieving disk space, checking hotfixes, etc.

I would also note that just because there isn’t cmdlets provided by Microsoft doesn’t mean we should wait to start using PowerShell for two reasons. First SMO is surprisingly intuitive once you get over the initial learning curve. Second, the community has stepped up and deliverd a great set of over 155 functions and cmdlets in http://sqlpsx.codeplex.com. Of course as the project coordinator/developer I’m a little biased :).

Ultimately its about choosing the right tool for the right job. For more details I’ve written several longer blog posts about this subject including:

http://sev17.com/2009/04/the-value-proposition-of-powershell-to-dbas/
http://sev17.com/2010/02/the-t-sql-hammer/

]]>
Chad MillerSat, 08 Jan 2011 15:00:24 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchor
SQL Server + PowerShell: Why? You Tell Me. Please.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchorFri, 07 Jan 2011 17:34:06 GMT
Thanks - I’m familiar with SQLBlog, actually, and it’s a great site. I tend to see folks there either (a) using PowerShell to execute T-SQL, which is fine, or (b) using PowerShell to code against .NET objects (SMO, usually), which is also fine. The SMO stuff is probably where folks would MOST like to see native PowerShell cmdlets, just to provide an easier, less programm-y wrapper that could integrate well with other cmdlets.

Until MS delivers those cmdlets, I’ve been looking for areas where I could help folks. The bottom line seems to be, you’re either using PowerShell to run T-SQL (and if your’e a DBA who doesn’t know T-SQL, I’m not going to be teaching it), or using PowerShell to run SMO stuff. I tend to stay away from anything that deeply .NET Framework-flavored, just because... well, the difference between PowerShell and Visual Studio at that point is pretty much the font used on the screen. A lot of the SMO stuff I’ve seen done in PowerShell would have been easier to accomplish in Visual Studio, and I’m not going there.

So I’m kinda looking for the middle ground. What tasks are people trying to accomplish with SQL Server, using PowerShell, that can’t be done with T-SQL... and which doesn’t involve heavy-duty SMO programming... and which lends itself more to a CLI than to "scripting" per se.

I’m a huge SQL fan - it was the first MS product, aside from Windows and VB, that I ever used. I’ve written and consulted about SQL performance and scalability for years. So part of this is just me trying to find a way to integrate my two hobby technologies :).]]>
Don JonesFri, 07 Jan 2011 17:34:06 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchor
SQL Server + PowerShell: Why? You Tell Me. Please.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchorFri, 07 Jan 2011 13:09:27 GMT
I have learned a great deal from your stuff here and the TechNet Magazine articles. I have never expected you to write anything specific to a product that may utilize PowerShell, whether it be SQL Server or SharePoint.

Yes I would agree that if I am only dealing with one server that has SQL Server running I am going to opt to use SSMS (SQL Management tool) to execute T-SQL before I would go to PowerShell. I think PowerShell can come into play when you have a large server environment and you need to gather or push information to the SQL instances/servers.

Not to push people away from your site but when I want something specific to a Microsoft product I’m going to go to the people that write about that product. SQLBlog.com has a handful of people that have caught on to what PowerShell can do when you use it with SQL Server. You might get an idea from checking there:
http://sqlblog.com/tags/Powershell/default.aspx

Again, you are doing a great job in my eyes. ]]>
william meltonFri, 07 Jan 2011 13:09:27 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/sql-server--powershell-why-you-tell-me-please-137443#commentsAnchor
Okay, okay, I'm social.http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/okay-okay-im-social-137438#commentsAnchorFri, 07 Jan 2011 12:33:12 GMT
If you figure out why LinkedIn is useful, please post it on my unused LinkedIn profile. Ha!]]>
daviperryFri, 07 Jan 2011 12:33:12 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/okay-okay-im-social-137438#commentsAnchor
Deals of the Day: Learn PowerShell for Half Off!http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/deals-of-the-day-learn-powershell-for-half-off-137440#commentsAnchorFri, 07 Jan 2011 11:23:38 GMT
Don, can you verify the link for the retreat? ]]>
uSlackrFri, 07 Jan 2011 11:23:38 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/deals-of-the-day-learn-powershell-for-half-off-137440#commentsAnchor
Deals of the Day: Learn PowerShell for Half Off!http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/deals-of-the-day-learn-powershell-for-half-off-137440#commentsAnchorMon, 03 Jan 2011 16:10:26 GMT
I wonder if that is good idea for book of that kind. I mean it is nice for people who already know PowerShell and just want to have yet another approach to learning it available. But for people who could take most of it - does it really make sense to attend in MEAP? In foreword, if I got it right, you suggest to use this book as title says: one month, 1 hour each day. But with MEAP it would be week now, one day next week, 2 next month and so long, and so forth. Doesn’t it break the idea behind the book? ;) But this is another tempting offer... And another book that will just have to wait for me until I find some time to read it. ;)]]>
Bartek BielawskiMon, 03 Jan 2011 16:10:26 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/deals-of-the-day-learn-powershell-for-half-off-137440#commentsAnchor
PowerShell Cheat Sheet, Punctuation Editionhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/powershell-cheat-sheet-punctuation-edition-137417#commentsAnchorWed, 29 Dec 2010 15:23:19 GMT
Link now gone. http://files.concentratedtech.com/pilot.pdf
Also noticed the link on pg. 7 on another poster for ’Power of Powershell’ is also dead. Issue 11.

Must be the holidaze?]]>
chilisoftwareWed, 29 Dec 2010 15:23:19 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/powershell-cheat-sheet-punctuation-edition-137417#commentsAnchor
My new PowerShell book is out! (And it's YOUR fault)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/my-new-powershell-book-is-out-and-its-your-fault-137437#commentsAnchorWed, 22 Dec 2010 19:28:17 GMT
Congratulations, I hope that the little bit of test reading and comments we as the community have supplied helped at least a little in some way. Now to try and convince my manager to let me buy the book!]]>
1fizgigWed, 22 Dec 2010 19:28:17 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/my-new-powershell-book-is-out-and-its-your-fault-137437#commentsAnchor
Single Quotes vs. Double Quotes in PowerShell: What's the Difference?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/single-quotes-vs-double-quotes-in-powershell-whats-the-difference-137435#commentsAnchorFri, 10 Dec 2010 11:57:29 GMT
Why are single quotes considered best practice?]]>
fensterFri, 10 Dec 2010 11:57:29 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/single-quotes-vs-double-quotes-in-powershell-whats-the-difference-137435#commentsAnchor
Single Quotes vs. Double Quotes in PowerShell: What's the Difference?http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/single-quotes-vs-double-quotes-in-powershell-whats-the-difference-137435#commentsAnchorFri, 10 Dec 2010 11:56:59 GMT
Why are single quotes generally considered best practice?]]>
fensterFri, 10 Dec 2010 11:56:59 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/single-quotes-vs-double-quotes-in-powershell-whats-the-difference-137435#commentsAnchor
How to Schedule PowerShell Scriptshttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/how-to-schedule-powershell-scripts-137432#commentsAnchorThu, 18 Nov 2010 05:21:11 GMT
For those who balk at the use of cmd.exe it might be worth to know that you actually can run "powershell /?" from within Powershell. ;)]]>
Torbjorn BergstedtThu, 18 Nov 2010 05:21:11 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/how-to-schedule-powershell-scripts-137432#commentsAnchor
A Peek into a PowerShell Class (and a Script Module / Advanced Function example)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-peek-into-a-powershell-class-and-a-script-module--advanced-function-example-137428#commentsAnchorTue, 16 Nov 2010 12:16:54 GMT
Hi Don,
I’m new to Powershell, and after my 1st course, and following your blogs and demonstrations, I’ve been addicted to Powershell. Just wanted to say thank you for this excellent example of using Advanced Functions, as well as the different techniques you threw in, like checking if the input is coming from the pipeline or input parameter.
I do have a quesiton if you can clarify for me. you have this example:
Get-Content names.txt | Get-OSInfo

But in the script, you declared the $logfile as a Mandatory parameter, shouldn’t the script fail, if you are missing the a filename to capture the fail computers?
[Parameter(Mandatory=$True)]
[string]$logfile
From the looks of it, I was expecting Get-Content names.txt | Get-OSInfo -logfile c:\error.txt

Thanks and Great work as always.
-Kane]]>
kl332118Tue, 16 Nov 2010 12:16:54 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-peek-into-a-powershell-class-and-a-script-module--advanced-function-example-137428#commentsAnchor
A Peek into a PowerShell Class (and a Script Module / Advanced Function example)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-peek-into-a-powershell-class-and-a-script-module--advanced-function-example-137428#commentsAnchorTue, 09 Nov 2010 21:54:22 GMT
@Bartek, you’re absolutely right. You get a warning every time. It’s annoying - and a reason to NOT use non-standard verbs!

As for my choice of syntax, keep in mind that in PowerShell there are usually a lot of ways to do anything. I find that more beginners do well with the syntax I used, in part because it breaks each property addition out onto a separate command/line. There’s nothing wrong with the syntax you propose. It’s actually a bit more concise - but "concise" can also be "confusing" to shell newcomers (something everyone should keep in mind as they blog). Since I spend a ton of time training, my syntax concerns are usually around readability and cognition, and not about concise code. It’s the same reason you won’t see me use the "%" alias very often, or the "?" alias. I should actually be better than I am about spelling out parameters and not using positional ones, actually. ]]>
Don JonesTue, 09 Nov 2010 21:54:22 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-peek-into-a-powershell-class-and-a-script-module--advanced-function-example-137428#commentsAnchor
A Peek into a PowerShell Class (and a Script Module / Advanced Function example)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-peek-into-a-powershell-class-and-a-script-module--advanced-function-example-137428#commentsAnchorFri, 05 Nov 2010 04:50:55 GMT
Don, you export-modulemember that uses non-standard verb.. I would expect a warning each time module is loaded.
I also don’t see any reason for using V1:
$obj | Add-Member
method of creating custom object instead of
New-Object PSObject -Property @{}
]]>
Bartek BielawskiFri, 05 Nov 2010 04:50:55 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/a-peek-into-a-powershell-class-and-a-script-module--advanced-function-example-137428#commentsAnchor
Manipulating Excel files with PowerShellhttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/manipulating-excel-files-with-powershell-137429#commentsAnchorTue, 02 Nov 2010 00:09:53 GMT
Sam: Thanks for sharing your example.

Don: Thanks for sharing your knowledge in a great class.

FR]]>
riosfTue, 02 Nov 2010 00:09:53 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/manipulating-excel-files-with-powershell-137429#commentsAnchor
Free PowerShell "Crash Course" Complete - 4 Chapshttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/free-powershell-crash-course-complete---4-chaps-137423#commentsAnchorFri, 22 Oct 2010 15:06:15 GMT
Hi Don,

I am new to Powershell and I am reading many article about Powershell which all are great. I already ordered your book (Powershell 2.0).

What I realy like to learn is to be able to use Powershell in my daily work which is SYS Admin therefore I am trying to find example of scripts which I can use at my work.

Best regards,
mradios

]]>
mradiosFri, 22 Oct 2010 15:06:15 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/free-powershell-crash-course-complete---4-chaps-137423#commentsAnchor
Into the [void]http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/into-the-void-137424#commentsAnchorWed, 20 Oct 2010 11:42:57 GMT
I liked your explanation, thanks!]]>
BewcWed, 20 Oct 2010 11:42:57 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/into-the-void-137424#commentsAnchor
In PowerShell, There Can be MORE Than Onehttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/in-powershell-there-can-be-more-than-one-137422#commentsAnchorSat, 16 Oct 2010 15:25:57 GMT
Sometimes I get lost at when I need to use a foreach and when I can simply pass a group of objects to another commandlet.

I find myself going back through code and re-doing it. Hard to leave those vb habits behind.]]>
ikkarusSat, 16 Oct 2010 15:25:57 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/in-powershell-there-can-be-more-than-one-137422#commentsAnchor
PowerShell Training Rounduphttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/powershell-training-roundup-137368#commentsAnchorWed, 13 Oct 2010 09:52:10 GMT
Hi Don! I’ve got a question in regards to PSv2 training.

I’ve convinced my company that I would highly benefit from PowerShell training, and I argue to them that getting training from you specifically, who is an expert and excited about the technology would be the best scenario.

For some strange reason, at some point, I misread the information on ScriptingAnswers about the 4 day training. I was certain that you were teaching it until today that I re-read it and learned that its the course-ware that you created, not actually teaching it there.

Then I ran into this article. You mention this:
"I’m also planning some 3-day "road show" classes later this year, in cooperation with Windows IT Pro"

Is this something i already missed out on?? I work out of Dallas, so getting the training from you locally would be convenient, and an honor : ).

So that was my question.. my bosses are on-board with funding the training, but the level of busy we operate at is not conducive to me flying out to Chicago any time in the near future.

Thanks for what you do, looking forward to hearing back.




]]>
GabeWed, 13 Oct 2010 09:52:10 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/powershell-training-roundup-137368#commentsAnchor
Creating and Comparing Configuration Baselineshttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/creating-and-comparing-configuration-baselines-137412#commentsAnchorTue, 12 Oct 2010 20:59:50 GMT
Nice job!, You certainly are giving your visitors a lot of precious info. This blog will be a hit!
I just love blogging and as i get spare time from busy schedule i start working on it. Wonderful post, I really enjoyed reading it!
]]>
Arnold60Tue, 12 Oct 2010 20:59:50 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/creating-and-comparing-configuration-baselines-137412#commentsAnchor
Capturing Errors (and Variable Names)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/capturing-errors-and-variable-names-137420#commentsAnchorThu, 07 Oct 2010 11:23:50 GMT
I have a follow-up question: I’ve used the $error variable frequently in try..catch blocks to great use, specifically when working with COM- or WMI-objects (since these often simply throw exceptions).

However, when I put a command like
try { ... }
catch { if ($error[0].exception -match "some string" { ... } }

inside a module, it simply won’t work; the $error variable becomes empty!?

I’ve made a workaround using Invoke-expression with the -errorvariable parameter, but I’d like to know why $error doesn’t work from modules?]]>
SnusmumrikenThu, 07 Oct 2010 11:23:50 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/capturing-errors-and-variable-names-137420#commentsAnchor
Capturing Errors (and Variable Names)http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/capturing-errors-and-variable-names-137420#commentsAnchorThu, 07 Oct 2010 11:23:41 GMT
I have a follow-up question: I’ve used the $error variable frequently in try..catch blocks to great use, specifically when working with COM- or WMI-objects (since these often simply throw exceptions).

However, when I put a command like
try { ... }
catch { if ($error[0].exception -match "some string" { ... } }

inside a module, it simply won’t work; the $error variable becomes empty!?

I’ve made a workaround using Invoke-expression with the -errorvariable parameter, but I’d like to know why $error doesn’t work from modules?]]>
SnusmumrikenThu, 07 Oct 2010 11:23:41 GMThttp://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/scripting-languages/capturing-errors-and-variable-names-137420#commentsAnchor