Tag: Windows PowerShell Page 1 of 9

Cross-platform PowerShell remoting in action

Summary: Learn how to configure and use cross-platform PowerShell remoting in PowerShell Core.

I’m Christoph Bergmeister, a London-based full stack .NET software developer with a passion for DevOps. To enable product testing of .NET Core apps across non-Windows machines in …

Script Wars: The Farce Awakens (part V)

Summary: Rey is skilled in PowerShell, and new to Contoso Holly Jolly Hat Company. Already she has been a great boon to her new co-workers and had her sneakers become the subject of a hungry trash robot.

She was just …

Script Wars: The Farce Awakens (part IV)

Summary: A quick recap shall we? Newly graduated from IT training and future guru in the world of Windows PowerShell, Rey Skyworker has been hired on by her mentor, Ben Kerberosie. Already, she has helped peers from her team improve …

Script Wars: The Farce Awakens (part III)

Summary: When last we saw our hero, Rey Skyworker, she was aiding her new co-worker, Tin. They managed to implement better error trapping by using the “Try Catch” statement in Windows PowerShell. The fact they could do this so easily …

Script Wars: The Farce Awakens (part II)

Summary: Yesterday, we met a newly graduated IT professional, Rey Skyworker, as she discussed the ways of “The Farce.” It was during this discussion that her instructor, Ben Kerberosie, discovered she had a natural gift in understanding how to implement …

Script Wars: The Farce Awakens (part I)

Summary: Seven years ago, “Hey, Scripting Guy!” was approached by a member of the community to see if we would be interested in doing something a little fun for the holidays.  The result was a seven-part series called “A PowerShell …

PowerShell support for certificate credentials

Summary: It’s not a very well-known feature, but the PSCredential object, and the PowerShell Get-Credential cmdlet, both support certificate credentials (including PIN-protected certificates). In this post, we take a look at how a certificate credential is marshaled inside a PSCredential …

Hey, Scripting Guy! update

Ed Wilson retired, but we are continuing his legacy of friendly tutorials on solving common problems. We will also help IT professionals expand their skill set beyond what might be their comfort zone. Examples of this include incorporating continuous integration/continuous …

Cloud operating system deployment: WinPE in Azure

Jason Ryberg is a Consultant for Microsoft, where he writes PowerShell code and provides DevOps support.  Have you ever wanted to boot to WinPE in Azure and select an Microsoft Deployment Toolkit (MDT) Task Sequence?  As part of an informal …

Announcing the 2016 Honorary Scripting Guys

Summary: The Honorary Scripting Guys for 2016 are announced.

Microsoft Scripting Guy, Ed Wilson, is here. Well, it has been an awesome year for Windows PowerShell and for the community. The Scripting Wife and I had the opportunity to …

PowerTip: Get a list of security patches installed in the last 90 days

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to get a list of all the security patches installed in the last three months.

Hey, Scripting Guy! Question How can I list all the security patches that I’ve installed in the last …

PSScriptAnalyzer deep dive – Part 4 of 4

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows how to write a custom PSScriptAnalyzer rule.

Hello! I’m Thomas Rayner, a Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy this week. You can find …

PowerTip: Get a list of suspended Azure Automation jobs

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how get a list of all your suspended Azure Automation jobs.

Hey, Scripting Guy! Question I think I have an Azure Automation job that is getting suspended for running too long. How can I …

PSScriptAnalyzer deep dive – Part 3 of 4

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows how to use Pester to get nUnit formatted results out of PSScriptAnalyzer.

Hello! I’m Thomas Rayner, a Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy …

PowerTip: Convert from UTC to my local time zone

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how write a function to convert from UTC to your local time zone.

Hey, Scripting Guy! Question I have a time that I’d like to convert from UTC to my local time zone. How …

PSScriptAnalyzer deep dive – Part 2 of 4

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows how to suppress, include, and exclude PSScriptAnalyzer rules.

Hello! I’m Thomas Rayner, a Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy this week. You can …

PowerTip: Find all the Azure Automation jobs that will run in the next two days

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to find all the Azure Automation jobs that will run in the next two days.

Hey, Scripting Guy! Question Is there a way to find all the Azure Automation jobs that will run …

PSScriptAnalyzer deep dive – Part 1 of 4

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics about how to use PSScriptAnalyzer.

Hello! I’m Thomas Rayner, a Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy this week. You can find …

Nearly everything has changed for SQL Server PowerShell

2016 was the best year in SQL PowerShell history! I guess I should have mentioned that here sooner.

Wired® Magazine recently said that Microsoft SQL Server was the surprise hit of the year. The primary cited reason is the …

View passwords of wireless profiles without using netsh.exe

Ever since the GUI lost the ability to view the password of a wireless profile, I wanted to provide this functionality in PowerShell. A search of the Internet for how to view the password of a Wi-Fi profile returns numerous …

Visual Studio Code editing features for PowerShell development – Part 2

Summary: Editing features for Visual Studio Code that use the PowerShell extension.

Welcome to Part 2 about editing features of Visual Studio Code. Everything that we  examined in Part 1 of this series is about Visual Studio Code editing features …

Visual Studio Code editing features for PowerShell development – Part 1

Summary: The editing features of Visual Studio Code come in handy as you develop your PowerShell scripts.

In the previous blog post, we explained how to get started with PowerShell development in Visual Studio Code. If you don’t …

SharePoint Online cmdlets to help your migration

Summary: Use these PowerShell cmdlets to migrate to SharePoint Online.

Today’s post is from Christopher Weaver, who is a Microsoft Premier Field Engineer (PFE) and focuses on SharePoint and Office 365 solutions for large enterprise Premier customers. He has …

Where[-Object] clauses for people who use SQL

Summary: Learn about the power of the Where[-Object] cmdlet in PowerShell.
Hey, Scripting Guy! Question Can I do a WHERE clause with an IN, in PowerShell?

Hey, Scripting Guy! Answer Yes!

Today’s post is from Aaron Nelson ( blog | twitter ), who is a Microsoft MVP for …

PowerTip: Get the Notes field when accessing users or groups in Active Directory

Summary: Use the Active Directory Module to get the information from the “Notes” field.

Hey, Scripting Guy! Question I’m trying to find the Active Directory property to use to access the Notes field when I’m viewing a user or a group. Could you …

Curly Blue and the meaning of scripting – Part 5

Summary: Curly Blue learns the true meaning of scripting in PowerShell.

When we last saw our hero, Curly Blue, he had discovered not only the ease of use of PowerShell but also the vast community resources provided by Github.…

PowerTip: Get a list of local Users in Windows 10 / Windows Server 2016

Summary: Use the cmdlets provided in PowerShell 5.1 to manage local user accounts on a system.

Hey, Scripting Guy! Question I remember having to use the Active Directory Service Interfaces (ADSI) accelerator to access a list of local users in PowerShell. Is there …

Curly Blue and the meaning of scripting – Part 4

Summary: Curly Blue learns how to use GitHub resources on PowerShell to clean out old office installations.

When we last saw our hero, Curly Blue, he had been hanging around the office of Azura and discovering the simple ways …

PowerTip: Use PowerShell to determine active CIM sessions

Summary: Use the Common Information Model (CIM) cmdlets to pull a list of active sessions to remote workstations.

Hey, Scripting Guy! Question How can I find active CIM sessions on my workstation?

Hey, Scripting Guy! Answer Just use this one cmdlet to list all active CIM sessions, …

Curly Blue and the meaning of scripting – Part 3

Summary: Curly Blue discovers the raw power of Cim-Instance combined with PowerShell remoting.

We continue with Curly Blue as he searches understand the meaning of scripting. He is still sitting in the office with Azura.

The co-op student, Hermie, …

PowerTip: List locked-out accounts in Active Directory with PowerShell

Summary: Use Active Directory cmdlets to identify locked-out user accounts and computer accounts.

Hey, Scripting Guy! Question Is there a quick and easy way to find all users who are locked out in Active Directory by using PowerShell?

 

Hey, Scripting Guy! Answer You’ll love this. The …

Curly Blue and the meaning of scripting – Part 2

Summary: Curly Blue learns how to use built-in PowerShell script examples in Windows.

Yesterday we met our new friends, Curly Blue and Linux. Curly had started his new job as a IT Professional at Contoso.

The challenge for poor …

PowerTip: Limit Get-Childitem to a limited depth in the tree

Summary: Use the new -depth parameter to control how far down a directory you can search.

Hey, Scripting Guy! Question I have a large file structure to search but I only want to go two folders deep on the search.  Is there a …

Curly Blue and the meaning of scripting – Part 1

Summary: Curly Blue learns how to automate cleaning of old data files by using PowerShell.

This week, in the spirit of the holidays (and of course the previous six years!), Hey, Scripting Guy is honored to bring forth a …

Make Visual Studio Code more like the integrated scripting environment

Summary: Learn some handy tips to make Visual Studio Code work more like the ISE.

I was very intrigued with the release of Visual Studio Code last year. An editor that is light-weight and integrated with Git is something worth …

Get started with PowerShell development in Visual Studio Code

Summary: Learn about the features in Visual Studio Code that help you write PowerShell code.

Since the PowerShell integrated scripting environment (ISE) shipped with Windows PowerShell 2.0 in 2009, the PowerShell landscape has changed significantly. In November 2014, Microsoft took …

PowerTip: Capture the output of a Linux application in PowerShell

Summary: Use the built-in features of PowerShell to obtain data produced by a Linux application.

Hey, Scripting Guy! Question Can I run a Linux application like ls and capture its output in PowerShell?

Hey, Scripting Guy! Answer You certainly can!  It’s no different from when you normally …

Open Source PowerShell – Part 4

Summary: Install and Configure SSH for Open Source PowerShell remoting.

Hey, Scripting Guy! Question With PowerShell, up to this point, one thing that I love is the ability to connect various systems in my environment and run cmdlets on them remotely.  Can we …

PowerTip: Return a status code to Linux from PowerShell

Summary: Pass a result code back to a calling Linux environment from Open Source PowerShell.

Hey, Scripting Guy! Question How can I pass a numeric value back to a calling Bash Shell to indicate an error?

Hey, Scripting Guy! Answer Just simply supply the EXIT command and …

Open Source PowerShell – Part 3

Summary: Pass and return data correctly between Bash and Open Source PowerShell.

Hey, Scripting Guy! Question Could you show me some examples of actually passing and returning values between PowerShell and Bash?

Hey, Scripting Guy! Answer Honorary Scripting Guy, Sean Kearney, is here today and we’ll do …

PowerTip: Get the status code of a PowerShell script in Bash

Summary: Identify the results of a script running in Open Source PowerShell in a Bash environment.

Hey, Scripting Guy! Question Is there any way to see the results of a PowerShell script? For example, if somebody sent an “Exit 42”, could I see …

Open Source PowerShell – Part 2

Summary: Use PowerShell scripts within Python and Bash (and those within PowerShell).

Hey, Scripting Guy! Question I am curious just how much I can use Open Source PowerShell within Linux and macOS.  Is it an isolated environment, or can it interact with other …

Manage SharePoint Online site collections and the web templates with PowerShell

Summary: PowerShell commands can manage site collections and the web templates that create site collections.

Christopher Weaver is a Microsoft Premier Field Engineer (PFE) who focuses on SharePoint and Office 365 solutions for large enterprise Premier customers. He has been …

Part 3 – Use Azure Automation DSC to Configure Linux and execute PowerShell scripts

Summary: Learn how to configure and use PowerShell, Bash, and DSC with Linux.

Hi, my name is Stefan Roth (Blog: http://stefanroth.net / Twitter: @stefanroth_net), and I am a Cloud and Datacenter MVP. In my last post of this …

PowerTip: Capture error code of a PowerShell session in Linux or macOS

Summary: Capture the status code of a PowerShell session in Linux or macOS.

Hey, Scripting Guy! Question Could you show me how to run a PowerShell script in Linux or macOS and capture the status of whether that script succeeded or failed?

Hey, Scripting Guy! Answer No …

Open Source PowerShell – Part 1

Summary: Find and install the Open Source PowerShell software for Linux or Windows.

Hey, Scripting Guy! Question I was reading up about a great new change in PowerShell. I heard that the newest version was Open Sourced on GitHub. Any chance you could …

PowerTip: Know the difference between the .split() method and ‘-split’

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to split a string by using a string instead of just a character.

Hey, Scripting Guy! Question I am trying to split the string “this is my amazing string” on the pattern “my” …

PowerShell regex crash course – Part 5 of 5

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell.

Hello! I’m Thomas Rayner, a proud Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. …

Join the PowerShell tenth birthday celebration

SUMMARY: Microsoft Scripting Guy Ed Wilson announces November 14, 2016 as date for PowerShell 10th anniversary celebration

Can you believe that PowerShell is nearly 10 years old (that is a long time in ‘internet time’)? On November 14, 2016 we …

PowerTip: How to use regular expressions to split a string without losing the character you split on

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to split a string without losing the character you split on.

Hey, Scripting Guy! Question I’m splitting this file name some file.txt into its name and extension by going “some file.txt” –split “.”

PowerShell regex crash course – Part 4 of 5

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell.

Hello! I’m Thomas Rayner, a proud Cloud & Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. …

Speed up remote PowerShell connection to Exchange

Summary: Speed up the connection to Exchange by importing only the cmdlets that you need.

Hey, Scripting Guy! Question Is there a way to speed up the initial PowerShell connection to Exchange?

Hey, Scripting Guy! Answer Yes, of course! With a little modification to Import-PSSession, we …

PowerTip: How to detect a valid Active Directory user name using regular expressions

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how use regex to detect if a string is a valid Active Directory user name.

Hey, Scripting Guy! Question The invalid characters for an Active Directory user name are /\[:;|=,+*?<>]\ and . How …

PowerShell regex crash course – Part 3 of 5

Summary: Thomas Rayner, Microsoft Cloud & Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell.

Hello! I’m Thomas Rayner, a proud Cloud & Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. …

PowerTip: How to detect phone numbers using regular expressions

Summary: Cloud and Datacenter Management MVP, Thomas Rayner, shows how to use regex to detect if a string is a phone number.

Hey, Scripting Guy! Question I have an array like $phoneornot = @('780-123-4567', '780 321 6548', 'notme', 'this is 2 num'), …

PowerShell regex crash course – Part 2 of 5

Summary: Thomas Rayner, Microsoft Cloud and Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell.

Hello! I’m Thomas Rayner, a proud Cloud and Datacenter Management Microsoft MVP, filling in for The Scripting Guy! this week. …

Part 2 – Install .NET Core and PowerShell on Linux Using DSC

Summary: Learn how to configure and use PowerShell, Bash, and desired state configuration (DSC) with Linux.

Today, Cloud and Data Center MVP Stefan Roth returns for Part 2 of his three-part series about how to configure and use PowerShell, …

PowerTip: How to escape characters in a string using regular expressions

Summary: Cloud & Datacenter Management MVP, Thomas Rayner, shows how escape characters for use in regex.

Hey, Scripting Guy! Question Is there a way to escape characters in a string automatically for use in regex?

Hey, Scripting Guy! Answer Use the [regex]::escape() method to automatically escape characters …

PowerShell regex crash course – Part 1 of 5

Summary: Thomas Rayner, Microsoft Cloud & Datacenter Management MVP, shows the basics of working with regular expressions in PowerShell.

Hello! I’m Thomas Rayner, a proud Cloud & Datacenter Management Microsoft MVP, filling in for The Scripting Guy this week. …

Part 1 – Install Bash on Windows 10, OMI CIM Server, and DSC for Linux

Summary: Learn about the Windows Subsystem for Linux that runs on top of Windows 10.

Today we have a guest article written by Stefan Roth. Take it away Stefan …

Hi, my name is Stefan Roth, and I am …

PowerTip: Use PowerShell to retrieve the date and time of the given time zone ID

Summary: Use PowerShell to pull out specify TimeZone data from an object.

Hey, Scripting Guy! Question I have data retrieved from an external source that contains different time zone IDs like W. Europe Standard Time, AUS Eastern Standard Time, etc. How can I …

Use PowerShell to integrate with the Lync 2013 SDK for Skype for Business – Part 2

Summary: Learn how to extend PowerShell with Lync 2013 SDK to explore groups and contacts information in Skype for Business 2016 client.

MVP Chendrayan Venkatesan is back again to show us how to get started with the Lync 2013 …

PowerTip: Use PowerShell to list all possible colors in the console

Summary: Use PowerShell and enumeration to access all possible colors that you can use in the console.

Hey, Scripting Guy! Question Is there a way to see all of the available colors that I can use when using Write-Host?

Hey, Scripting Guy! Answer We sure can! …

Use PowerShell to integrate with the Lync 2013 SDK for Skype for Business – Part 1

Summary: Get started with the Lync 2013 SDK by using PowerShell to manage Skype for Business 2016 client.

Hey, Scripting Guy! Question Could you show me an example of how to report on my SharePoint data by using other than the standard ASCII …

PowerTip: Identify the numeric value of a custom (dingbat) character using PowerShell

Summary: Use PowerShell to determine the value of an Extended ASCII character to reproduce it for later use.

Hey, Scripting Guy! Question I have a really simple question that’s been bugging me. I have a string with a special (Extended ASCII) character that …

Use PowerShell to report on SharePoint content with custom (dingbat) characters

Summary: Learn how to use PowerShell to retrieve SharePoint list item values as dingbat symbols to make HTML reports simple and clean.

Hey, Scripting Guy! Question Can you show me an example of how to report on my SharePoint data by using something …

Use PowerShell to maintain IIS logs

Summary: Learn how to use PowerShell to maintain and work with IIS logs.

Welcome back guest blogger, Terri Donahue. Here are Terri’s previous blog posts. Terri is a Senior Customer Support Engineer for Dynamicweb NA and a Visual …

PowerTip: Use PowerShell to remove a user from all site collections in SharePoint Online

Summary: Learn how to use PowerShell to remove a corporate user from all site collections in SharePoint Online.

Hey, Scripting Guy! Question How can I use Windows PowerShell to quickly remove a corporate user from all site collections in SharePoint Online?

Hey, Scripting Guy! Answer Use the …

Manage your SharePoint Online tenant with PowerShell

Summary: Learn how to manage your SharePoint Online tenant installation by using Windows PowerShell cmdlets.

Christopher Weaver is a Microsoft Premier Field Engineer (PFE) who focuses on SharePoint and Office 365 solutions for large enterprise Premier customers. He has …

Get started with PowerShell and SharePoint Online

Summary: Microsoft PFE Chris Weaver talks about getting started with Windows PowerShell and SharePoint Online.

Welcome back Chris Weaver as guest blogger. You can see his previous guest blogs.

Christopher Weaver is a Microsoft Premier Field Engineer (PFE) …

PowerTip: Find all devices connected to a computer

Summary: Use PowerShell to find all devices that are connected to a computer.

Hey, Scripting Guy! Question How can I use Windows PowerShell to list all devices that are connected to a computer?

Hey, Scripting Guy! Answer Use the Get-PnpDevice cmdlet and the -PresentOnly switch. Here is …

Passing through devices to Hyper-V VMs by using discrete device assignment

Summary: Learn how to attach a device from your Hyper-V host to your VM by using a new feature of Windows Server 2016.

Today we have a guest blogger, Rudolf Vesely, who has blogged here on previous occasions. Here …

PowerTip: Get the public IP of an Azure VM with PowerShell

Summary: Use the Azure Resource Manager cmdlets to get the public IP address of an Azure virtual machine.

Hey, Scripting Guy! Question How can I get the public IP address information for an Azure Resource Manager virtual machine (VM)?

Hey, Scripting Guy! Answer All you need to …

How to alter the public IP address of an Azure virtual machine

Summary: Change the public IP address in Azure Resource Manager by using Windows PowerShell.

Honorary Scripting Guy, Will Anderson, shares a personal challenge that he encountered when working with Azure and public IP addresses. He also shares the solution …

PowerTip: Get a GUI interface for any PowerShell cmdlet

Summary: Use the Show-Command to build PowerShell cmdlets.

Hey, Scripting Guy! Question I ran into a problem. Some cmdlets have too many parameters to list. Is there an easy way to build a cmdlet with its parameters for the console?

Hey, Scripting Guy! Answer You’ll love this …

Find ready-to-use sample PowerShell scripts in the GUI

Summary: Honorary Scripting Guy, Sean Kearney, goes over some often missed, easy-to-use PowerShell techniques for those who are starting out.

Hey, Scripting Guy! Question I had heard a rumor that many of the management tools actually run PowerShell code in the backend. Is …

PowerTip: List all available CIM classes by using PowerShell

Summary: Use the Get-CimClass cmdlet to see all classes that you can query from.

Hey, Scripting Guy! Question How can I find a list of Common Information Model (CIM) classes in Windows so that I can ask my computer useful questions?

Hey, Scripting Guy! Answer Just run …

Use Windows PowerShell as an administrative console

Summary: Honorary Scripting Guy, Sean Kearney, shares his early use of PowerShell as a network administrator.

Hey, Scripting Guy! Question I have a simple but irritating task each day around lunch time. A handful of people usually lock themselves out of Active Directory. …

PowerTip: List all subfolders under a target path with PowerShell

Summary: Use Get-Childitem to provide a printable list of all folders under a path.

Hey, Scripting Guy! Question I used to use tree.com to get a list of folders on a computer. Is there something close to that in PowerShell? Maybe something I …

Erase files based on date by using PowerShell

Summary: Honorary Scripting Guy, Sean Kearney, relates his first experience with PowerShell.

Hey, Scripting Guy! Question I was curious just how difficult it is to use Windows PowerShell. For example, how difficult is it to erase files based on the current date?

Hey, Scripting Guy! Answer Honorary …

PowerTip: Use a destructive PowerShell cmdlet safely

Summary: Use the –whatif parameter with PowerShell cmdlets to test code live.

Hey, Scripting Guy! Question I heard that PowerShell has a built-in safety switch to many of its cmdlets. Could you show me an example of it in use?

Hey, Scripting Guy! Answer No problem. You’re …

Use Windows PowerShell to search for files

Summary: Use Get-Childitem to search the files system with PowerShell.

Hey, Scripting Guy! Question I saved a file somewhere on my computer and can’t find it. Is there a way to use Windows PowerShell to find it?

Hey, Scripting Guy! Answer Honorary Scripting Guy, Sean Kearney, is …

PowerTip: Remove trailing space from a string by using PowerShell

Summary: Use the trim() method to remove leading and trailing spaces from a string.

Hey, Scripting Guy! Question Could you do me a huge favor and show me how to get rid of spaces before and after a string in PowerShell?

Hey, Scripting Guy! Answer No problem …

Build a hexadecimal clock in PowerShell – Part 5

Summary: Learn to split data in a Here-String and get a console beep.

Honorary Scripting Guy, Sean Kearney, is here with our final day this week to wrap up building a hexadecimal clock in PowerShell.

When we finished yesterday, …

PowerTip: Set the color of the progress bar with PowerShell

Summary: Use the $Host object to alter the color of the progress bar in PowerShell.

Hey, Scripting Guy! Question I was curious if there’s a way to change the color of the progress bar in PowerShell. Do you know how this could be …

PowerTip: Set a default value in a switch statement

Summary: Use the default field in switch statement to have an assumed value.

Hey, Scripting Guy! Question I was playing with Select-String and would like to have it default to a value if none was trapped for. How can I do that?

Hey, Scripting Guy! Answer Just …

Build a hexadecimal clock in PowerShell – Part 3

Summary: Use Select-String in PowerShell to identify data and match it to an array.

Honorary Scripting Guy, Sean Kearney, is here today to play more with our funky, nerdy, cool hexadecimal clock.

Yesterday we built out a small function …

PowerTip: Use PowerShell to identify a leap year

Summary: Use PowerShell and Math to identify a leap year.

Hey, Scripting Guy! Question Is there a way to use PowerShell to identify whether this year is a leap year?

Hey, Scripting Guy! Answer Actually there is! You can use a combination of Get-date to find out …

Build a hexadecimal clock in PowerShell – Part 2

Summary: Manipulate string data from Get-Date in PowerShell.

Honorary Scripting Guy, Sean Kearney, is here today to have a little more fun with our silly project to build a hexadecimal clock in the PowerShell console.

Well, after all, who …

PowerTip: Extend a string array in PowerShell

Summary: Use the built in features of PowerShell to easily add new Element to a string array.

Hey, Scripting Guy! Question I created an array of strings in PowerShell, but I need to add to it. Is there a simple way to do …

Build a hexadecimal clock in PowerShell – Part 1

Honorary Scripting Guy, Sean Kearney, is here today, and I’m going to sit down and have some fun this week.

Today I was feeling a bit bored and, for some reason, the thought “hexadecimal clock” entered my head. Don’t ask …

PowerTip: Export Azure resource group as JSON by using PowerShell

Summary: Use the Azure Resource Manager cmdlets to export a resource group as a JSON configuration.

Hey, Scripting Guy! Question I’ve heard that JSON is used to define features in Azure Resource Manager. Is there a way to export a resource group in …

Create Azure Resource Manager virtual machines by using PowerShell – Part 5

Summary: Use the Azure Resource Manager cmdlets to assign credentials and create the virtual machine.

Hey, Scripting Guy! Question Now that I’ve built all the objects for the virtual machine (VM), what’s left before we spin up the machine in Azure Resource Manager?…

PowerTip: Search Azure Resource Manager image publishers by using PowerShell

Summary: Use the Azure Resource Manager cmdlets to search publishers for a match.

Hey, Scripting Guy! Question Could you show me an example of how to search through the list of publishers for Azure images?

Hey, Scripting Guy! Answer Just use the Get-AzureRMVMImagePublisher cmdlet, and filter on …

Create Azure Resource Manager virtual machines by using PowerShell – Part 4

Summary: Use the Azure Resource Manager cmdlets to select the operating system image for a virtual machine.

Hey, Scripting Guy! Question I’ve got most of that virtual machine (VM) assembled, but I was having quite a time trying to pull together the operating …

PowerTip: Change current Azure Resource Manager subscription by using PowerShell

Summary: Use the Azure Resource Manager cmdlets to alter the current active subscription in use.

Hey, Scripting Guy! Question I have about a dozen different subscriptions in my Azure Resource Manager account. How can I change it from the default one to one …

Create Azure Resource Manager virtual machines by using PowerShell – Part 3

Summary: Use the Azure Resource Manager cmdlets to create and attach a virtual network card to a virtual machine.

Hey, Scripting Guy! Question I’m trying to find some guidance about how to use PowerShell to create a virtual network card. Would you be …

PowerTip: Get the time and date as a string of numbers by using PowerShell

Summary: Use the –format option in Get-Date to change the output.

Hey, Scripting Guy! Question I’d like to build some log files and have the date and time as part of the name. Is there a way to show the date and time …

Create Azure Resource Manager virtual machines by using PowerShell – Part 2

Summary: Use the Azure Resource Manager cmdlets to define the operating system disk on a storage blob for a virtual machine.

Hey, Scripting Guy! Question Would you help me, please?  I need to know how to define storage for my virtual machine in …

PowerTip: Find available virtual machine size by using PowerShell

Summary: Use the Azure Resource Manager cmdlets to get the proper name for a virtual machine size.

Hey, Scripting Guy! Question Is there a way to see the proper name for a virtual machine size without creating a virtual machine first?

Hey, Scripting Guy! Answer Just use …