Tag Archives: PowerShell

PowerShell ISE Preview | A Sneak Peak

There is a new kid in the PowerShell block. Microsoft PowerShell team has announced a new preview ISE version which is separate from WMF 5.0. This product is uploaded to the PowerShell Gallery, to provide more agile builds rather than waiting to be packaged with WMF.  You can run both ISE Preview and OS built-in ISE version side by side without any conflict.

Getting Started

In order to run the ISE preview you should have WMF 5.0 installed. Unless you are using Windows 10 you need to download and install WMF 5.0 package.

Update

WMF 5.0 package has been removed from the Download Center due to a bug. Please refer the announcement here. Therefore you will have to stick with Windows 10 as of the writing of this post.

  • Open a PowerShell window with elevated privileges and execute below cmdlet. Alternatively you can use -Scope CurrentUser parameter if you wish to install the preview only for your user account.

Install-Module -Name PowerShellISE-preview

  • Following cmdlet will install Start menu shortcuts for ISE preview.

Install-ISEPreviewShortcuts

  •  To start the ISE preview type isep and press enter.
  • To update the ISE module simply execute below cmdlet.
Update-Module -Name PowerShellISE-preview

Limitations

  • Currently the ISE Preview only works with PowerShell v5 installed, either with Windows 10  or with WMF 5.0
  • This release is English-only.
  • There is a possibility for existing add-ons to have issues with the new ISE Preview.  PowerShell team states that ISE Steroids and Azure Automation Authoring Toolkit seems to be working fine with the new preview according to their testing.

 

Azure Automation PowerShell ISE add-on is now GA

Azure Automation team has announced the general availability of PowerShell ISE add-on for Azure Automation last week. With this add-on it is easier to author your Azure Automation runbooks using the familiar PowerShell ISE. Below are some of the notable features of this add-on.

  • Use Automation activities (Get-AutomationVariable, Get-AutomationPSCredential, etc) in local PowerShell Workflows and scripts
  • Create and edit Automation assets locally
  • Easily track local changes to runbooks and assets vs the state of these items in an Azure Automation account
  • Sync runbook / asset changes between a local runbook authoring environment and an Azure Automation account
  • Test PowerShell workflows and scripts locally in the ISE and in the automation service

Installing Azure Automation add-on for PowerShell ISE is pretty much straight forward. Although you can install the add on from the GitHub source, Microsoft recommends that you install the add-on from the PowerShell Gallery.

  • In an elevated PowerShell window execute below cmdlet. This will install the add-on only for the current user.

Install-Module AzureAutomationAuthoringToolkit -Scope CurrentUser

  • To automatically load the Azure Automation ISE add-on every time you open the PowerShell ISE execute below cmdlet.

Install-AzureAutomationIseAddOn

  • Also to load the add-on adhoc only when you want, execute  below cmdlet in the PowerShell ISE.

Import-Module AzureAutomationAuthoringToolkit

Installing & Configuring Azure PowerShell

Do you know that Microsoft Azure offers a flexible management options rather than the Azure Portal? With Windows PowerShell you can perform most of the routine tasks that you do in your cloud tenants, from creating VMs to scaling your applications. This comes pretty much handy if you have scheduled or predefined cloud workloads that you need to perform on Azure. Lets take a look on how to install and configure Azure PowerSehll for your cloud tenant.

Prerequisites

  1. An Azure Subscription
  2. A computer that is either running Windows 7 or Windows Server 2008 R2 upwards.

Installing Azure PowerShell

Azure PowerShell comes as a redistributable running in Microsoft Web Platform installer. You can download the setup from here. When prompted, select Azure PowerShell in the feature selection stage. You’ll notice that  the new Azure PowerShell when you do a search or in Al  Programs in your computer.

Connecting to your subscription

In order to manage a tenant first the Azure PowerShell needs to be connected to an active subscription. There are two methods for this. Using a downloaded management certificate which include the subscription information, or by logging into Microsoft Azure using your Microsoft Account associated to that subscription. Note that the  Azure AD will perform the credential authentication in the latter method.

OK I’m all set. Now what can I do with Azure PowerShell?

Azure PowerShell provides a large number of cmdlets that can be used to provision, deploy, manage & maintain Azure services. These includes creating, modifying & deleting of VMs, VM networks, cloud services, storage, web sites etc… Much like in Windows PowerShell there is a comprehensive help content of each and every one of these cmdlets.

I’ve included some articles that I found on how to use Azure PowerShell. Also you can create PowerShell scripts and locally run them in your on premise infrastructure to manage your cloud tenant. The power is up-to you to automate.

Resources

  1. Configuring Azure PowerShell
  2. Provisioning VMs with Azure cmdlets