Installing PowerCLI from PowershellGallery

This is   part 3 of Installing PowershellGet on Windows 7. This time we are going to install PowerCLI latest version from the PowerShell Gallery.

Part 2:  http://shaulov.us/2018/01/13/upgrading-powershellget-1-0-0-1-to-the-latest-version
Part 1:  http://shaulov.us/2018/01/09/installing-powershellget-windows-7/

Let’s head to PowershellGallery website, and  find the latest stable version for PowerCLI https://www.powershellgallery.com. As of today, version “7736736” is still in beta. So we are going to use “-RequiredVersion” option to download and install the previous, stable, release.

Open the Powershell with elevated ( Administrator level) privileges:

PS C:\> Save-Module -Name VMware.PowerCLI -Path c:\PSRepo -RequiredVersion 6.5.4.7155375

PS C:\> install-module -name VMware.PowerCLI

Note:  you might need to press “A” to allow install to proceed, as PSGallery might not be in your trusted list of repositories  to download and install modules from:

Ideally, you should now be able to run  any PowerCLI  cmdlet and it would work as expected.

Note: You must uninstall older ( non-PovershellGallery one) versions of the PowerCLI manually from Programs and Features, and then re-install VMware.PowerCLI via PowershellGet,  otherwise they will conflict with the new version, and it will only work partially.

Please, see a nice write-up below in case if the VMware.PowerCLI don not load automatically.

http://www.gsx.com/blog/bid/81096/enhance-your-powershell-experience-by-automatically-loading-scripts

 

Upgrading PowershellGet 1.0.0.1 to the latest version

This is a part 2 of the getting Powershell upgraded from v2 to v5.1, and PowerShellGet and PowerCLI installed and running on a Windows 7 Pro/Ent workstation.

The latest PowerShellGet version as of today, January 2018, in the PSGallery is v1.6.0. It needs to be downloaded to local repository first before installing it.

   PS C:\> mkdir PSRepo
   PS C:\> Save-Module -Name PowershellGet -Path C:\PSRepo

Something to note here, NuGet package is required before continuing further, and it will be installed automatically when PowerShellGet is upgraded or downloaded.

  PS C:\> install-module -name PowershellGet -force

Let’s list the Powershell modules again, and confirm that PowerShellGet 1.6.0 is available to us.

  PS C:\> Get-Module -ListAvailable

PowershellGet 1.6 installed with old version

Oops, we have got the older versions of PackageManagement and PowershellGet still there. Naturally, we need to remove the older versions at this point.
Continue reading →

Installing PowershellGet on Windows 7

Recently, I had to re-install OS on my primary workstation at home.  And of course, I had to get PowerShellGet  working again before I could install PowerCLI, or vDocumentation modules. Naturally, it took some time to hunt down the bits and pieces on getting PowerShellGet up and running. So, this time around I have decided to document getting PowerShellGet working on Windows 7, as well as making sure that I am using the latest version of it.
Windows 7 Pro/ENT  by default comes with PowerShell v2, and doesn’t contain PowerShellGet.

All the commands are run with elevated (a.k.a administrator’s) privileges under x64 bit Powershell console.

let’s start the PowerShell console  and see currently available modules:

  Continue reading →

Help my Windows Server 2012 (2016) deduplicated drive is gone crazy (not releasing space)

I make use of deduplication feature on Windows Server 2012, and Windows Server 2016 quite extensively. And, it does wonders. Its deduplication ranges from 10% (wsus content, backup server) to upwards of 55% ( File Share servers and SCCM Distribution Points with ISOs and .wim images, as well as packages and applications).

Recently, a case was brought to my attention where a  drive with wsusContent on freshly installed Windows 2016 server has started running out of space. Initial drive size was about 100GB, and after few
Continue reading →

WSUS server serving wsusContent; local vs remote.

Ah yes, you have had enough of it. WSUS content folder keeps growing in size day by day. You have tried feeding it 20 GB, then another 50, then 100 GB. No, it won’t stop growing and keeps demanding more and more space.

No worries, there is a solution for that… Maybe… in any case as gecko says ” 15 minutes could save you 15% or more on”  of your valuable disk space on your (v)SAN storage

Continue reading →

WSUS 2016 error: Report Viewer 2012 Redistributable is required for this feature.

Trying to generate reports on SUS 2016 gives out  an error stating that its missing  “The Microsoft Report Viewer  2012 Redistributable is required for this feature”

Head over to Microsoft’s website to download and install the “The MICROSOFT® REPORT VIEWER 2012 RUNTIME”  https://www.microsoft.com/en-us/download/details.aspx?id=35747

During its installation  you might get another error, this time warning you about missing ” Microsoft System CLR Types for SQL Server 2012

And then Report Viewer installations fails with below error.

 

If that is the case, then you will need to do the following:

TL;DR

  1. Download and install Microsoft® System CLR Types for Microsoft® SQL Server® 2012
  2. Re-install the Report Viewer 2012

Long version

Continue reading →

Migrating WSUS to a new Windows 2016 server, and 2014 standalone SQL server

Plan is to retain current WSUS data and configuration while moving the SUS service from old Windows 2016 TP 5 server to an new fully licensed Windows 2016 Standard server, and move database from WID to a standalone SQL 2014 server.

1)   Setup a new Windows 2016 Server, update. Patch, reboot. Install the WSUS role on it, choose the WID database during the install. Make sure to point to a drive\folder for wsusContent.
a. Copy the wsusContent folder from old server to the new one. Make sure you placing it to the proper drive\path, you identified during post-install configuration for new WSUS service.
Continue reading →

Teradici APEX 2800: how can I quickly confirm if the offloading works or not.

I recently got my hands on teradici’s 2800-lp (low profile) offloading card for the a Horizon view 7 VDI PoC implementation. The one I am using is a PCI Express version of the card that can be installed on any server with PCIe gen2 x4/x8 or x16 slot.

There are also MXM Type A with Mezzanine Adapter and an Amulet Hotkey DXM-A versions. They are designed for HP’s Gen8 and 9 blade servers, and for Dell M Series blades respectively. In either case, standalone, mezzanine adapter, or an amulet hot key, you can install up to 2 of such cards per server.

There are plenty of choices on the market for a GPU offloading, some of which are Nvidia’s Grid K1/K2, Nvidia Tesla K40 /K80, and AMD’s FirePro S7150 (x2) GPU cards.

Continue reading →

Categories: vdi

Recovering VMs after a vmware’s Purple Screen of Death (PSOD)

I had an interesting case a while ago. One of our test ESXI hosts running ESXi version 5.5 has crashed taking down number of test environments with it.

All the attempts to bring the host back to life was in vain, as each reboot was giving us a Purple screen of Death.  We needed these test environments up and running ASAP, and due to time limit on hands, it was decided to :

  1. keep the current VMFS datastore and install partition intact,
  2. Install ESXI 5.5 from scratch onto a USB flash drive, and
  3. Re-create the vSwitches
  4. Re-import the VMs into inventory
  5. Re-import and start up the vCenter
  6. Login to vCenter and bring up the test environment back online

Luckily this test server- a Cisco UCS C220- had its CIMC enabled, and IP configured for remote access.  So, I was able to connect to the hosts’s remote management panel (CIMC) and install the new Esxi via Continue reading →