Licensing

ESXi Licensing

If the ESXi instance is not being managed through vCenter, perform the Standalone steps below. Otherwise, perform the vCenter Managed steps.

Standalone

After a license key has been obtained, it can be activated on an ESXi install in Host Manage Licensing within the ESXi portal. Select Assign license and enter the key.

vCenter Managed

To license an ESXi host being managed by vCenter, perform the vCenter Licensing steps included below. When assigning the license, select the ESXi host under Hosts.

vCenter Licensing

Adding Licenses

Licenses can be added to vCenter through the menu Administration Licensing Licenses, then selecting ADD.

Assigning Licenses

Test

Once licenses have been added to vCenter, they must still be assigned to assets. Within the Assets tab, select an asset (e.g. the vCenter server), then select ASSIGN LICENSE. Select the license to assign, and confirm.

Xubuntu Prerequisites

Visual Studio Code Installation

VSCode can be installed on Xubuntu as either a Snap package or via apt.

Snap Installation

sudo snap install code --classic

Apt Package Installation

The relevant repository and signing key will be automatically installed to the system if the .deb package is downloaded and installed with sudo apt install ./file.deb. Alternatively, this process can be accomplished manually as follows:

# Add signing key
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
 
# Install package
sudo apt update
sudo apt install code

VSCode Setup

Once vscode is installed, be sure to install the PowerShell extension within it.

Additionally, update the PowerShell extension’s profile to include the module that will be created below. First create the module if necessary, then open the profile file with code $profile or similar (within vscode). Within this file, add the module path as follows:

$env:PSModulePath = $env:PSModulePath + ":/home/reed/NET-480-2023SP/modules"

PowerShell Module Creation

The following steps can be performed to create a PowerShell module.

Initial Setup

Module Manifest

Prior to creation of any module functionality, a module manifest must first be created. Within an empty subdirectory, use the following command (Note: the author and company are optional):

New-ModuleManifest -Path .\<filename>.psd1 -Author "<author>" -CompanyName "<cname>" -RootModule "<module-name>.psm1" -Description "<description>"

This will create a manifest in the current directory at <filename>.psd1. A psd1 is a manifest file. The root module <module-name>.psm1 will contain the module code (create this file manually).

Reloading Module

As changes are made, to use the updated functions in our current shell session the following command can be used to reload the module:

Import-Module '480-utils' -Force