showing all posts
by lunarg on March 22nd 2018, at 16:34
On a fresh install of Windows Server 2012R2, not joined to a domain, the first network connection (obtained through DHCP) is always treated as a Public network. Normally, when joining a domain, the network connection then becomes a Domain network, but if the server will not be joined to a domain, you probably will want to set it to Private. Unfortunately, the Public Network link in Network Center is not clickable, and thus, cannot be changed. But you can make the change anyway through the Local Security Policy.

Through Powershell (preferred method):

Look up the name of the network interface (e.g. "Local Area Connection") in the network adapters list.

Open an elevated Powershell   ...
by lunarg on March 12th 2018, at 12:01

A very useful blog article about killing active sessions to a compromised Office 365 account:

by lunarg on March 12th 2018, at 08:27

Starting from Windows 10 Creators Fall Update, you can use VT escape sequences to colorize the output to console. You can use this to colorize columns in Format-Table, too.

A sample snippet, colorizing the output based on the contents of the "Status" field:

$somelist | FT FirstName,LastName,@{l="Status";e={
    switch ($_.Status) {
        "OK" {$color = 92; break}
        "NOT OK" {$color = 91; break}
        default {$color = 93}

A complete list of color codes can be found here:

by lunarg on February 23rd 2018, at 11:19
When opening the EMC or EMS on an Exchange 2010 server, you may encounter this error:

The attempt to connect to http://server.domain.local/Powershell user 'Kerberos' authentication failed: Connecting to remote server failed with the following error message: The WS-Management service cannot process the request. The system load quota of 1000 requests per 2 seconds has been exceeded. Send future requests at a slower rate or raise the quota for this user. The next request from this user will not be approved for at least X milliseconds.

To workaround the issue, perform a restart of IIS: open an elevated command prompt and run:

iisreset /restart

After the restart, you will be able to log  ...
by lunarg on February 12th 2018, at 13:36
When starting up SQL Server or Analysis Services on Server 2012, you may encounter errors in the Application event log, even though SQL Server itself seems to operate normally:

ESENT error 1032
sqlservr (3472) An attempt to open the file "C:Windowssystem32LogFilesSumApi.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ". The open file operation will fail with error -1032 (0xfffffbf8).

These errors are logged due to insufficient permissions for the service startup accounts for SQL Server and Analysis Services when the services access the following folder for logging as a part of the Software Usage Metrics feature: C:\Windows\System32\  ...
by lunarg on February 9th 2018, at 10:03

HP 1920 switches (and others of the same kind) have a CLI mode which is highly restricted. It is possible to unlock this, providing full access to the configuration of the switch through CLI.

Log on to the CLI (SSH or Telnet) with the admin user and the password (default: none).

Type and press Enter:

_cmdline-mode on
All commands can be displayed and executed. Continue? [Y/N]

Press Y to confirm.

Please input password:

Enter the password. This is a firmware-set password and is not user-defined. Depending on the firmware, try one of these:

  • 512900
  • Jinhua1920unauthorized

If successful, you can now run all commands.

by lunarg on January 30th 2018, at 10:40

You can easily update your vCenter Server Appliance (VCSA) offline by downloading a product patch ISO and via the CLI.

Download the latest patch from VMware Patch Download Center. Select VC from the Search by Product drop-down menu, then select the correct version (i.e. 6.0 or 6.5). Download the patch ISO and attach it to the VCSA.

Log in to the shell (using SSH or VMRC) and initiate the update:

  1. Stage the ISO updates:
    software-packages stage --iso
  2. Optionally, you can view the list of packages to be updated:
    software-packages list --staged
  3. To install the updates, run:
    software-packages install --staged

After the update has finished, you will have to reboot the VCSA.

by lunarg on January 17th 2018, at 11:29

You can use either esxcli or vicfg-hostops to enter/exit maintenance mode.


  • Enter: esxcli system maintenanceMode set --enable true
  • Exit: esxcli system maintenanceMode set --enable false


  • Enter: vicfg-hostops --operation enter
  • Exit: vicfg-hostops --operation exit

Note that you can use vicfg-hostops --operation info to check whether the host is finished with entering maintenance mode or is still busy.


After connecting to the host or vCenter server:

  • Enter: Get-VMHost <name-of-host> | Set-VMHost -State Maintenance
  • Exit: Get-VMHost <name-of-host> | Set-VMHost -State Connected
by lunarg on January 17th 2018, at 11:10
When attempting to register the vSphere Replication appliance to the PSC, you may encounter this error:

Server returned 'request expired' less than 0 seconds after request was issued, but it shouldn't have expired for at least 600 seconds.

On the appliance, look in the log file /opt/vmware/hms/logs/hms.log: if you see messages similar to the following, the time of the replication appliance and the PSC may not be in sync.

2017-01-14 06:57:00.694 ERROR com.vmware.vim.sso.client.impl.SoapBindingImpl [main] (..client.impl.SoapBindingImpl) | SOAP The time now Wed Jan 18 12:27:31 MST 2017 does not fall in the request   ...
by lunarg on January 15th 2018, at 14:12
In environments which have migrated from Exchange 2010 to 2013 (or later), and where public folders have been decommissioned, you may encounter the following events in the Application event log:

MSExchange ADAccess, Event ID: 2937
Process MSExchangeTransport.exe (PID=9356). Object [CN=Contoso,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com]. Property [RemotePublicFolderMailboxes] is set to value [ Objects/PublicFolderMailboxDEL:d980f9a4-2014-4165-aad0-7ab91b35ef01], it is pointing to the Deleted Objects container in Active Directory. This property should be fixed as soon as possible.

With the removal of the public folders database, not all objects re  ...
by lunarg on January 10th 2018, at 14:28
Internet Explorer 11 has an integrated Adobe Flash Player plugin, but on Windows Server 2016, this plugin is not active by default. In fact, checking the available plugins within IE does not show the plugin as installed. This is because the plugin is not activated by default (which is somewhat logic as it's considered a security risk).

The package containing the plugin does exist on Windows Server 2016 (with GUI) but is not active. You can manually activate the plugin through dism:

dism /online /add-package /packagepath:"C:\Windows\servicing\Packages\Adobe-Flash-For-Windows-Package~31bf3856ad364e35~amd64~~10.0.14393.0.mum"

After adding the package, you will have to reboot for it  ...
by lunarg on January 8th 2018, at 10:20

You can easily test the availability of an NTP server by using ntpdate. This utility is a command line utility which performs a one-time time sync to the specified NTP server but it can also be used to query the time without setting it by using the -q parameter:

$ ntpdate -q
server, stratum 4, offset 0.001217, delay 0.04170
 8 Jan 10:19:36 ntpdate[2376]: adjust time server offset 0.001217 sec
by lunarg on December 19th 2017, at 10:35
You can very easily update your appliance to the latest version of OpenVPN by following these instructions:

Find the download URL to download the new package. You do not have to download it, you just need the link: using your webbrowser, navigate to Software Packages, click on Ubuntu, then copy the link for the Ubuntu 14 amd/x86 64-bit package. Use that URL in the next step.

Log on to the appliance using SSH (or directly on the console), using the root account and the password (you should have this).

Download the package using wget:wget download_URL_you_copied

This will download the package and store it in the current folder on the appliance.

Install the package:dpkg -i http://swupdate.  ...
by lunarg on December 19th 2017, at 09:11
Currently, it's not possible to set up HTML-based auto-reply messages on shared or resource mailboxes, as you cannot directly log on to OWA to set the message. Through Powershell, you can do this quite easily.

First, create two HTML-files containing your internal and external message. You do not have to specify the <html> and <body> tags. Save these to a convenient location. Be sure to save them as regular text files, with extension .txt.

Next, log on to Exchange Online management shell.

cd to the location of the two message files, and load them to variables:

$internalmessage = Get-Content -Path internalmessage.txt

$externalmessage = Get-Content -Path externalmessage.txt  ...
by lunarg on December 19th 2017, at 09:08
A few steps to enable management of your Office 365 subscription using Powershell. One uses Powershell because not all configuration is available through the Office 365 Portal, and it's also useful for automation.

UPDATE (2016-04-20): updated links and information.

Download and install the Microsoft Online Services Sign-In Assistant.This is required in order to be able to sign in to Office 365.

Download and install Azure Active Directory Module for Windows PowerShell (64-bit version).Note: 32-bit users, see below.

Optionally, you can also download and install modules to manage Sharepoint Online and Skype for Business Online.

32-bit Azure AD Module
From October 20, 2014, the Azure Ac  ...
by lunarg on December 19th 2017, at 08:58
If you are using multi-factor authentication, it is not possible to use the old method of connecting to Exchange Online. You will have to install the Exchange Online Remote PowerShell Module, and use the Connect-EXOPSSession cmdlet to connect.

You can install the PowerShell module by following these instructions:

Log on to Exchange admin center.

In the left menu, click on hybrid.

Click the configure button for the Exchange Online Remote PowerShell Module. This will start the installation.

In the Application Install that appears, click the Install button.

A shortcut will be placed on your desktop which will start PowerShell with the required modules.

Start Exchange Online Remote PowerS  ...
by lunarg on December 18th 2017, at 15:45

For those looking for the default PIN for the bluetooth connection of a HP OfficeJet H470, it's 0 0 0 0.

Although it can be found in the manual somewhere, it's easily overlooked.

by lunarg on December 14th 2017, at 14:03

Sometimes, you need to temporarily start a service (such as SSH) to perform some maintenance task. PowerCLI can help you with this:

To start the SSH server on each host of a vCenter:

Get-VMHost | Get-VMHostService | ? {$_.Key -eq "TSM-SSH"} | Start-VMHostService

To stop the SSH server:

Get-VMHost | Get-VMHostService | ? {$_.Key -eq "TSM-SSH"} | Stop-VMHostService -Confirm:$false

As always, you can make adjustments to the oneliner to select another service to start/stop, or further limit the selection of hosts to a cluster or a group of hosts (e.g. filtered by name).

by lunarg on December 14th 2017, at 14:00
If you're making changes to the datastore, setting up a new cluster and have a lot of hosts, and wish to set up system logging, you can do so very quickly using PowerCLI.

First, add all the hosts to the vCenter like you normally would. Then, connect to the vCenter server and run this cmdlet:

Get-VMHost | % { $vm = $_ $vm | Get-AdvancedSetting "" | Set-AdvancedSetting -Value "True" -Confirm:$false $vm | Get-AdvancedSetting "" | Set-AdvancedSetting -Value "[DataStore01] ESXiLogs" -Confirm:$false}

The cmdlet above will set the system log location to a folder on DataStore01 and enables unique log di  ...
by lunarg on December 12th 2017, at 12:35
When performing large storage migrations, it may be useful to get a list of VMs and the datastore and/or folder they are located in. PowerCLI can provide this very quickly:

Get-VM | Select Name,@{N="Datastore";E={[string]::Join(',',(Get-Datastore -Id $_.DatastoreIdList | Select -ExpandProperty Name))}},@{N="Folder";E={$_.Folder.Name}}

You can further pipe this to other cmdlets (such as Where-Object to filter even more), or export it to a CSV.

You can also go into more detail and determine the location of each virtual disk (VMDK) of each VM:

Get-VM | Get-View | % { $name = $_.Name $_.Layout.Disk | % { New-Object PSObject -Property @{ Nam  ...
showing all posts