background preloader

Learning

Facebook Twitter

A task-based approach to PowerShell cmdlet design. Several years ago I had a discussion with a colleague about how Windows PowerShell functions/cmdlets should be designed.

A task-based approach to PowerShell cmdlet design

As a developer by trade, he liked the idea of having a small number of cmdlets that output objects through several methods. I can definitely see the benefit of this approach -- for a developer. But for IT admins, this really turns us off. Calling methods on the output of a command is completely foreign to administrators; we are used to running a command and getting back the data we want. I love the idea of having task-based cmdlets that perform a single action and provide feedback related to that task.

Santhosh Sivarajan's Microsoft Technology Web Site. Powershell Research - System.Security.Cryptography.X509Certificates.X509Store. Creating a Managed Service Account. Updated: February 28, 2009 Applies To: Windows Server 2008 R2.

Creating a Managed Service Account

Create Managed Service Accounts with PowerShell. Do not create managed service accounts with Active Directory Users and Computers. - Active Directory Documentation Team. Getting the Contents of an Active Directory Integrated DNS Zone, Version 2. In June of 2009, I published the first version of Getting the Contents of an Active Directory Integrated DNS Zone.

Getting the Contents of an Active Directory Integrated DNS Zone, Version 2

Shortly after that, Chris Dent (chris at highorbit dot co dot uk) published a blog post clarifying the format of the dnsRecord attribute. Most of the time, the difference between the "correct" format and what I had deduced had no effect. But, I recently had to go back to this project and I needed to decode more DNS resource records. Now, using the proper format became important. Thus, version 2 of the utility was born. I hope you'll enjoy this update. Until next time... Tech Ed 2008 - Demo 2 - Administering Servers in Bulk - Benp's Guide to Stuff.

Bonjour Bonjour It’s time for Demo 2 – Administering Servers in Bulk.

Tech Ed 2008 - Demo 2 - Administering Servers in Bulk - Benp's Guide to Stuff

I’ve attached the 4 scripts that I used. Tech Ed 2008 - Demo 1 - Administering Windows - Benp's Guide to Stuff. Hello Again Well I’ve delivered my session “Windows, PowerShell and WMI: Unveiling Microsoft’s Best Kept Secret”, and as promised here are the scripts for the Demo’s I used during my session: Demo 1 – Administering Windows All these demos are simple command lines that I just typed straight in PowerShell, no need for any fancy scripts.

Tech Ed 2008 - Demo 1 - Administering Windows - Benp's Guide to Stuff

Basics The following lines of code show help on how to use the Get-WMIObject cmdlet in PowerShell, how to list all classes in the cimv2 namespace and finally how to use some basic parameters. Disks These lines of code show how to get disk information from a system, identify all the properties and methods of the disk objects that can be used, then uses some properties. Hotfixes These lines connect to a system and list all the Hotfixes that have been installed. Windows PowerShell Survival Guide - TechNet Articles - Home - TechNet Wiki. This article was formerly titled "Automating IT Tasks with Windows PowerShell Overview.

Windows PowerShell Survival Guide - TechNet Articles - Home - TechNet Wiki

"** Introduction and Getting Started PowerShell is a vast product, especially when you take into account how it's used in other products such as Lync Server, Exchange, and the Windows Operating System. MAML - Microsoft Assistance Markup Language. Note: Notice the news of 2005-04-12!

MAML - Microsoft Assistance Markup Language

Table of Contents MAML - Overview Microsoft Assistance Markup Language (MAML) is a XML based markup language used by "Longhorn" Help. The current help system HTMLHelp 1.x is using HTML topic files. HTML is a markup language that combines presentational and semantic elements.The most significant aspect of MAML is the shift to a structured authoring model. MAML consists of several distinct content types, each one specific to a type of document. Content authored in MAML can be output to many different formats, including DHTML, XAML, RTF, and print. Conceptual Content Type The conceptual content type is the most generic of all the content types.

Active Directory Powershell Blog. Scripting with Windows PowerShell. DFS-R Health Report for SYSVOL « blog.powershell.no. Included in the Windows Server 2008 and Windows Server 2008 R2 are the DFS Management-console as well as several command-line tools for administering DFS.

DFS-R Health Report for SYSVOL « blog.powershell.no

A great built-in feature in these tools is the diagnostic reports. This is available in the DFS Management-console: As well as from the DfsrAdmin.exe command-line tool: Using this feature we can generate an HTML-report containing a great overview of the replication health for the SYSVOL replication group: Any errors and warnings will be shown with detailed explanations.

MSDN

TechNet. Windows PowerShell Survival Guide - TechNet Articles - Home - TechNet Wiki. This article was formerly titled "Automating IT Tasks with Windows PowerShell Overview.

Windows PowerShell Survival Guide - TechNet Articles - Home - TechNet Wiki

"** Introduction and Getting Started PowerShell is a vast product, especially when you take into account how it's used in other products such as Lync Server, Exchange, and the Windows Operating System. Powershell Scripts, Tips and Resources. Use the New Computername Parameter in Windows PowerShell 2.0.

Blogs

Silverlight, WPF, WP7 Charts & Gauges. PowerShell Wiki - PowerShell Wiki. Scripting Series – Interesting things you can do with VBScript and Powershell – Post 1, Self Deletion « .\Matthew Long. Posted by Matthew on February 25, 2011 For the first challange i’m going to tackle in this series, we have the problem of self deletion.

Scripting Series – Interesting things you can do with VBScript and Powershell – Post 1, Self Deletion « .\Matthew Long

Windows PowerShell Owner's Manual. Poshoholic. This morning PowerWF and PowerSE 2.7 were released to the web and they can now be downloaded from These releases offer a lot of new value to PowerWF and PowerSE users, as follows: PowerWF 2.7 Highlights New Start Page with New Workflows The start page in PowerWF has been completely redesigned to provide immediate value out of the box for PowerWF customers. The new design highlights the Workflow Library that is included with PowerWF, allowing customers to play workflows in the library without opening a workflow or script document. Users can also customize the workflows on the start page and add their own groups of workflows for easier runbook automation. Getting ALL Your Parameters - Windows PowerShell Blog. When you write a function, you can name a set of parameters and PowerShell will bind command line arguments to them.

Any command line argument that is NOT bound do a parameter is available as $args. eBook: Layman’s guide to PowerShell 2.0 remoting. If are you a regular visitor to this blog, you may be aware of my PowerShell remoting series of blog articles. Traffic to this blog increased by almost 80% ever since I started the remoting series. This set of articles appear on the first page of Internet search almost all the time. The idea behind starting the remoting series was to develop the content in to an eBook at the end. Microsoft Expression Blend - Working with the Canvas Video. Let us start working with Layout. I have opened Blend all ready. I am going to switch over to the Projects tab on the welcome screen and this time, I am going to the project. I need to open it from my Assets Folders that was created for me when I installed the Total Framing software.

In the Project Files, Part 1, Lesson 02, I am going to open the Layout Tutorial project. Now, once the project opens, I am going to use Pen tools so I can see it a little bit better. The Canvas is a control that application designers and UI designers are most familiar with because it is the oldest and most basic control. Get-credential and Decrypting a SecureString in MSH. In MSH there are a couple of places where you will find a SecureString. the Most Common will be Get-Credentials. this will give you a secure way to enter and pass credentials to a CMDlet or function. one place in MSH where this is very handy is in get-WMIobject.if you want to connect with alternate credentials you can pass a Credential object.this will give you a safe way to let the user enter a password for this.

MSH>get-wmiobject -credential $(get-credential) -computer ComputerName win32_process Cmdlet get-credential at command pipeline position 1Supply values for the following parameters:CredentialUser: mowPassword for user mow: *** if you look at the passwordProperty of a credentialObject, you will see that it is a secureString object. Scripting Series – Interesting things you can do with VBScript and Powershell – Post 2, UAC Elevation « .\Matthew Long. In the first challenge in this series, I covered script self deletion. Creating Organization chart from Active Directory using Power GUI « Virtualize SharePoint, SharePoint Virtualization, Virtualization Tips.

Getting Credentials From The Command Line - Windows PowerShell Blog. Interesting. Using Get-Credential to Store Passwords “securely” in a file. Ben's blog.

HuddledMasses

Debugging using PowerShell ISE102. August 18, 2009 at 12:08 PM — Andy Schneider. Debugging using PowerShell ISE 101. I have always found the origin of words to be fascinating. Apparently, the terms bug and debugging in regards to computers are attributed to Admiral Grace Hopper in the 1940’s. While she was working on a Mark II Computer at Harvard University, her associates discovered a moth stuck in a relay and thereby impeding operation, whereupon she remarked that they were "debugging" the system. When I first started scripting and writing a little code, the concept of debugging something seemed really hard.

Industrial Strength Functions in PowerShell V2 CTP 3. With PowerShell V2 we can now get nearly all the functionality of the PowerShell engine that is available to Cmdlet developers that are using C#. Granted, if you haven’t written any Cmdlets in C#, you probably don’t understand the power that this brings, but trust me, its huge! Syntax Highlighting in PowerShell – Precision Computing. More PowerShell Syntax Highlighting – Precision Computing.