Download Microsoft vNext Technical Preview with Powershell!

UPDATE: Added Windows 10 Enterprise and SQL Server 2014.

Microsoft just released the Technical Preview for Windows Server vNext and System Center vNext!

Release Notes for Windows Server: http://technet.microsoft.com/library/dn765470.aspx
What’s New for Windows Server: http://technet.microsoft.com/library/dn765472.aspx

Release Notes for System Center: http://technet.microsoft.com/en-us/library/dn806369.aspx

Aaaaaaaaaaand, let me present the download script!

Use the parameter -Path to specify the download folder.
Use the parameter -WithProgress if you want to see the progress of the download.

withprogress

Advertisements

Saving SCSM and SQL resources by disabling Cube Processing

If you do not use the OLAP Reporting Cubes in Service Manager it’s probably just going to use resources while delivering no business value.

By disabling Cube Processing and the SSAS instance you’ll save 4GB+ of RAM usage and the CPU usage from the Cube Processing task.
Depending on what your Service Manager environment looks like, it could be a couple of dollars on your electricity bill or a couple of more dollars if you’re running your environment in a pay-as-you-go Cloud, such as a Public Cloud or a Hosting Service Provider.

And lucky for you I’ve made a Powershell script to do this for you!

WMF / Powershell 5.0 Preview – September 2014

A couple of days ago it seems that Christmas came early! Microsoft released the latest preview of WMF 5.0 which includes the latest and greatest version of Powershell. And wow, the feature list is extensive!

On a high level it includes major functional and Powershell ISE improvements for:

  1. DSC
  2. String-handling
  3. Logging / Auditing Powershell usage
  4. Filesystem management

And new features for:

  1. Generating Powershell cmdlets from OData Endpoints
  2. Managing .zip files with native cmdlets
  3. Using and managing PowershellGet (OneGet)
  4. Managing switches that are Windows Server 2012 R2 logo-certified
  5. Developing new classes
  6. Dynamic method invocation

If you want to read more about the new and/or improved functionality with examples you’ll have to download and read the release notes! It’s 33 pages of Powershell madness!

In the coming days I will be looking a bit more on the new features 5 and 6. Can’t wait to deep-dive into this!

The September release of WMF 5.0 can be downloaded at:
http://www.microsoft.com/en-us/download/details.aspx?id=44070

If you’re trying Powershell 5.0 please submit and discuss feedback at:
https://connect.microsoft.com/PowerShell/Feedback

Install or update Microsoft Azure Powershell Module with Powershell

DEPRECATED POST – NEW AND UPDATED POST CAN BE FOUND HERE

After “manually” updating/installing my Azure Powershell Module from GitHub a couple of times to often, just in the last 4 months, I decided it’s time make a script for this! Or rather a function which I can reuse. 🙂

Install by simply executing:

Get-AzurePowershellModule -Install

You can also download the installer by omitting the -Install parameter. By omitting the -Install parameter the function will the path to the downloaded installer.
If you want more output you can use the parameter -ShowVersion to output the installed version (if any) and the latest version on GitHub.
You can also use -Verbose if you want even more output.

You’ll find the code below or can download directly from GetAzurePowershellModule.

function Get-AzurePowershellModule
{
    [cmdletbinding()]
    Param(
        [switch]$ShowVersion,
        [switch]$Install,
        [string]$Path=$null
    )
    BEGIN
    {
        If ($ShowVersion.IsPresent)
        {
            $Modules = Get-Module -ListAvailable
            $InstalledVersion = ($Modules | Where-Object {$_.Name -eq "Azure"}).Version.ToString()
            Write-Output "Installed: $InstalledVersion"
        }

    }
    PROCESS {
        Try
        {
            $WebSite = Invoke-WebRequest -Uri "https://github.com/Azure/azure-sdk-tools/releases/latest" -Method Get -TimeoutSec 30
        }
        Catch
        {
            Throw "Failed to get Web Content for Azure Powershell Module: $($_.Exception.Message)"
        }

        if ($ShowVersion.IsPresent)
        {
            $LatestVersion = ($WebSite.Links | Where-Object {$_.href -eq $WebSite.BaseResponse.ResponseUri.AbsolutePath}).innerText
            Write-Verbose "LatestVersion = $LatestVersion"
            Write-Output "Latest: $LatestVersion"
        }

        $DownloadURL = ($WebSite.Links | Where-Object {$_.InnerHTML -eq "Windows Standalone"}).href
        Write-Verbose "DownloadURL = $DownloadURL"

        If ($Path -ne $null)
        {
            if ((Test-Path $Path) -eq $false)
            {
                $OutFilePathRoot = (Get-Item $Path).Directory
            }
        }
        if ($OutFilePathRoot -eq $null)
        {
            $OutFilePathRoot = $env:TEMP
        }
        $OutFilePath = "$($OutFilePathRoot)\$($DownloadURL.Split("/")[-1])"
        Write-Verbose "OutFilePath = $($OutFilePath)"

        Invoke-WebRequest -Uri $DownloadURL -OutFile $OutFilePath -Method Get -TimeoutSec 60

        $LogPath = $OutFilePath.Split(".")
        $LogPath[-1] = "log"
        $LogPath = $LogPath -join "."
        Write-Verbose "LogPath = $($LogPath)"

        If ($Install.IsPresent)
        {
            Start-Process $OutFilePath -ArgumentList "/quiet /norestart /log $($LogPath)" -Wait -PassThru
        }
        else
        {
            Write-Output "Azure Powershell Module downloaded to: $($OutFilePath)"
        }
    }
    END
    {
        If ($Install.IsPresent)
        {
            Remove-Item -Path $OutFilePath -Force -Verbose
        }
    }
}

Microsoft Azure IaaS Cost Estimator Tool released!

Ever wondered what it would cost to run your datacenter on Azure? Good!

Are you running Virtual Machine Manger to manage your virtualization hosts? Even better! (But it doesn’t really matter)

Microsoft has released a cost estimator tool help you get a grasp of what your environment would cost to run on Azure!

Read more about the cost estimator tool at: Microsoft Azure IaaS Cost Estimator Tool

Powershell User Group Sweden – October 2013 Meeting!

As promised during my session at the Powershell User Group Sweden meet last week I will publish my scripts used in my SMA session. And here they are!

For those of you not attending the meet I had the opportunity to give a super compact lesson in Powershell Workflow to cover the basics. Workflows are after all the foundation of SMA. I gave the attendees an overview of SMA administration. Both in powershell/ISE and the Windows Azure Pack portal!

smaportal

Continue reading

Windows Powershell Remoting Resources

Running powershell locally is always great fun, but what about remoting?

There’s a whole lot of things to think about besides Enter-PSsessoin and Invoke-Command. Here’s some resources to get you started!

eBook: Secrets of PowerShell Remoting by Don Jones and Dr. Tobias Weltner

Blog post: Understanding Powershell Remote Management by Ed Wilson

Blog post: Learn How to Manage Remote PowerShell Sessions by Ed Wilson

Video: Advanced Automation with Windows PowerShell (MDC-400) by Jeffrey Snover and Don Jones

Video: Getting started with PowerShell 3.0 Jump Start by Microsoft Virtual Academy

Remember that PowerShell is just not a marketing gimmick, it’s the feature of administration and automation!