Daniel Schroeder

Sharing my tips and tricks to help other developers be more productive. This blog has moved to http://blog.danskingdom.com
posts - 44 , comments - 41 , trackbacks - 0

Monday, June 24, 2013

Add ability to add tabs to the end of a line in Windows PowerShell ISE

In the preamble of an earlier post I mentioned that one of the little things that bugs me about Windows PowerShell ISE is that you can add tabs to the start of a line, but not to the end of a line.  This is likely because it would interfere with the tab-completion feature.  I still like to be able to put tabs on the end of my code lines though so that I can easily line up my comments.  Here is how we can achieve this functionality in PowerShell ISE.

Read more at http://blog.danskingdom.com/add-ability-to-add-tabs-to-the-end-of-a-line-in-windows-powershell-ise/

Posted On Monday, June 24, 2013 4:08 PM | Comments (0) |

Saturday, June 22, 2013

Automatically Create Your Project’s NuGet Package Every Time It Builds Via NuGet

So you’ve got a super awesome library/assembly that you want to share with others, but you’re too lazy to actually use NuGet to package it up and upload it to the gallery; or maybe you don’t know how to create a NuGet package and don’t have the time or desire to learn.  Well, my friends, now this can all be handled for you automatically.

Read more at http://blog.danskingdom.com/automatically-create-your-projects-nuget-package-every-time-it-builds-via-nuget/

Posted On Saturday, June 22, 2013 10:17 AM | Comments (1) |

Wednesday, June 19, 2013

PowerShell ISE: Multi-line Comment and Uncomment Done Right, and other ISE GUI must haves

I’ve written some code that you can add to your ISE profile that adds keyboard shortcuts to quickly comment and uncomment lines in PowerShell ISE.  Feel free to skip the Preamble and get right to the good stuff.

Read more at http://blog.danskingdom.com/powershell-ise-multiline-comment-and-uncomment-done-right-and-other-ise-gui-must-haves/

Posted On Wednesday, June 19, 2013 5:48 PM | Comments (0) |

Wednesday, June 12, 2013

Free Xbox 360 Games If You Have Xbox Live Gold Subscription

I know this isn’t programming related (and thus doesn’t quite go with the theme of my blog), but I thought I’d share anyways.  Pass this along to anybody you know that has an Xbox 360.

At E3 Microsoft announced that it would start giving away 2 free games a month to Xbox Live Gold subscribers.

On July 1st Assassin’s Creed 2 and Halo 3 will be available to download for free.

Right now you can go download Fable 3 for free. I downloaded it last night, so it’s legit.

To download the games, from your 360 dashboard go to:

Read more at http://blog.danskingdom.com/free-xbox-360-games-if-you-have-xbox-live-gold-subscription/

Posted On Wednesday, June 12, 2013 11:05 AM | Comments (0) |

Friday, June 7, 2013

Create and publish your NuGet package in one click with the New-NuGetPackage PowerShell script

I’ve spent a good chunk of time investigating how nuget.exe works and creating a PowerShell script called New-NuGetPackage to make it dirt simple to pack and push new NuGet packages.

Here’s a list of some of the script’s features:

Read more at http://blog.danskingdom.com/create-and-publish-your-nuget-package-in-one-click-with-the-new-nugetpackage-powershell-script/

Posted On Friday, June 7, 2013 2:56 PM | Comments (0) |

Monday, June 3, 2013

Fix Problem Where Windows PowerShell Cannot Run Script Whose Path Contains Spaces

Most people will likely find the “Run script path with spaces from File Explorer” (to be able to double click a PS script whose path contains spaces to run it) section below the most helpful.  Most of the other content in this post can be found elsewhere, but I provide it for context and completeness.

Read more at: http://blog.danskingdom.com/fix-problem-where-windows-powershell-cannot-run-script-whose-path-contains-spaces/

Posted On Monday, June 3, 2013 1:26 PM | Comments (0) |

Friday, May 17, 2013

Why I Chose WordPress Over Geeks With Blogs, And Moving From WordPress.com To A GoDaddy Hosted Solution

A while back I wrote about some reasons why I didn’t like GWB (Geeks With Blogs) and was attracted to WordPress.  6 months later and I am confident that I made the right decision.  GWB was good to me, but…

Read more at http://blog.danskingdom.com/why-i-chose-wordpress-over-geeks-with-blogs-and-moving-from-wordpress-com-to-a-godaddy-hosted-solution/

Posted On Friday, May 17, 2013 5:57 PM | Comments (0) |

Thursday, May 16, 2013

Powershell functions to get an xml node, and get and set an xml element’s value, even when the element does not already exist

I’m new to working with Xml through PowerShell and was so impressed when I discovered how easy it was to read an xml element’s value.  I’m working with reading/writing .nuspec files for working with NuGet.  Here’s a sample xml of a .nuspec xml file:

Read more at http://blog.danskingdom.com/powershell-functions-to-get-an-xml-node-and-get-and-set-an-xml-elements-value-even-when-the-element-does-not-already-exist/

Posted On Thursday, May 16, 2013 5:18 PM | Comments (0) |

Thursday, May 9, 2013

PowerShell function to create a password protected zip file

There are a few different ways to create zip files in powershell, but not many that allow you to create one that is password protected.  I found this post that shows how to do it using 7zip, so I thought I would share my modified solution.

Here is the function I wrote that uses 7zip to perform the zip, and 7zip supports using a password to zip the files.

Read more at http://blog.danskingdom.com/powershell-function-to-create-a-password-protected-zip-file/

Posted On Thursday, May 9, 2013 5:45 PM | Comments (0) |

Wednesday, May 1, 2013

Powershell Multi-Line Input Box Dialog, Open File Dialog, Folder Browser Dialog, Input Box, and Message Box

I love PowerShell, and when prompting users for input I often prefer to use GUI controls rather than have them enter everything into the console; some things like browsing for files or folders or entering multi-line text aren’t very pleasing to do directly in the powershell prompt window.  So I thought I’d share some powershell code that I often use for these purposes.

Read more at http://blog.danskingdom.com/powershell-multi-line-input-box-dialog-open-file-dialog-folder-browser-dialog-input-box-and-message-box/

Posted On Wednesday, May 1, 2013 6:05 PM | Comments (0) |

Powered by: