Browse by Tags

Tagged Content List
  • Blog Post: Design of Script Friendly APIs, lessons from $psISE

    Cmdlets are high level, task-oriented abstractions. The implementation of cmdlets can talk to anything: Web services, COM objects, WMI objects, .NET objects – anything. Depending upon how developers design their API, they can make it easier or harder to write cmdlets. Now that you can write cmdlets in...
  • Blog Post: Why Should I Test With PowerShell?

    Today, on our internal discussion list, someone asked if there were any advantages to testing with PowerShell versus testing with C#. I was able to come up with 10 quick reasons to test with PowerShell: Being able to run command line programs easier within PowerShell Dynamically generating code or test...
  • Blog Post: The Semantic Gap

    There are 2 worlds: The world as we think about it. The world as we can manipulate it. The difference between these two is what is called the semantic gap .  Our industry has been struggling with the semantic gap for decades.  An excellent example of the semantic gap is provided by the TechProsaic...
  • Blog Post: Cmdlets vs. APIs

    Some people have asked the question, "Why Cmdlets?". If you already have a reasonable API, what is the value in writing Cmdlets? I'll provide a quick answer here but we should probably include a good write up of this in our documentation. The most important thing to realize about cmdlets is that it...
  • Blog Post: Using a DSL to generate XML in PowerShell

    A while back, Jeffrey posted an article on how to use string expansion and XML casts to build XML documents in-line in a PowerShell script: http://blogs.msdn.com/powershell/archive/2007/05/29/using-powershell-to-generate-xml-documents.aspx The overall feel of the approach that Jeffrey described...
  • Blog Post: Editing your Profile file

    $hay has a new scripting blog at http://scriptolog.blogspot.com/ . His first blog entry Restart your engine - The PowerShell Way , talks about how he frequently edits his PowerShell profile file and then restarts his session. In his directions he says: 2: type: Notepad $profile to open your profile...
  • Blog Post: Encoding Operations Knowledge

    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...
  • Blog Post: BaseName for FileInfo objects

    <Edited to add categories> In our active, responsive, and useful newsgroup Microsoft.Public.Windows.PowerShell (SELL SELL SELL :-) ), MVP Alex Angelopoulos recented posted the following: Although file extension changing is a common technique in administrative tasks, the System.IO.FileInfo...
  • Blog Post: Managing Active Directory with Windows PowerShell

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

    PSMDTAG:FAQ: How can I pipeline data to a parameter which does not accept pipeline input? PSMDTAG:FAQ: What are ScriptBlock Parameters? One of the foundation concepts of Windows PowerShell is pipelining objects instead of text. What happens is that when an upstream command generates an object, the...
  • Blog Post: More - How does PowerShell formatting really work?

    <Edited 7/2/2006 with tags and categories> PSMDTAG:FAQ: Why doesn't output expand when I expand the width of the console? PSMDTAG:FAQ: Why doesn't output expand when I use -noElements on GROUP? Consider the example: PS> gps |group company Count Name Group ----- ---- ----- 34 Microsoft...
  • Blog Post: $ERRORVIEW="CATEGORYVIEW"

    <Edited 7/2/2006 with tags and categories> PSMDTAG:FAQ: What is $ErrorView? PSMDTAG:FAQ: How do I get error details? Have you tried out $ErrorView="CategoryView" yet? Remember - errors are just objects. Given that they are objects, we render a subset of their properties to the console. ...
  • Blog Post: Programmatic way to get valid string values for a parameter

    <WIZARD WARNING> ISVs and Tool vendors may find this important, Advanced users may find this interesting, Casual users may want to skip this. Someone asked me if there was a programmatic way to tell what the legal values for a string parameter to a cmdlet was. The example was OUT-FILE -ENCODING...
  • Blog Post: Exposing the Power of .NET in a Admin-friendly way

    One of our primary goals for Monad was to: "Expose the power of .NET in an Admin-friendly way" . The challenges of systems administration are large and growing at the same time organizations are under ever more pressure to reduce costs and do more with less. That was true 10 years ago, it is true...
  • Blog Post: Base64 Encode/Decode a string

    Today I came across http://scripts.readify.net/ . This sight is focused on Monad and MSH and is starting a collection of scripts at: http://scripts.readify.net/Scripts.aspx . You should visit their site and let them know what type of scripts would be useful to you. I particularly liked their entry...
  • Blog Post: How does Select-String work with Pipelines of objects?

    <Edited to convert Match-String to Select-String 7/9/2006> In our newsgroup (Microsoft.Public.Windows.Server.Scripting) , Vasu asked about how Select-string works in pipelines: Here is what I observe: 1. MSH C:\> get-alias ..truncated.. Alias ri remove-item Alias rni rename-item ..truncated...
  • Blog Post: Why did you do that? $VAR/ {} / Weak Intellisense

    I strongly encourage people to let us know where we could be doing better and to let us know if we are getting into the weeds. I believe that being open to such bad news is core to the the virtuous cycle of self improvement so such feedback provides opportunities to reflect and make changes when appropriate...
Page 1 of 1 (17 items)