Posted On April 22, 2022

How To Install VMM Agent (SCVMM) Manually

kimconnect 0 comments
blog.KimConnect.com >> Virtualization >> How To Install VMM Agent (SCVMM) Manually

The following snippet assumes that a New Hyper-V Server has been added to the cluster; yet, it’s SCVMMAgent Service doesn’t get installed or is corrupted such as:

PS C:\Windows\system32> get-service SCVMMAgent
get-service : Cannot find any service with service name 'SCVMMAgent'.
At line:1 char:1
+ get-service SCVMMAgent
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (SCVMMAgent:String) [Get-Service], ServiceCommandException
    + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.GetServiceCommand
# Version 0.01
# No robot crawler to locate the highest VMMAgent version automatically (will code that when I feel like it)

# Install VMM Agent
$vmmServer='vmmServerName'
$version='10.19.2591.0'
$agentMsiFile="\\$vmmServer\C$\Program Files\Microsoft System Center\Virtual Machine Manager\agents\amd64\$version\vmmAgent.msi"

# Installing VMM Agent using its MSI File
$file=gi $agentMsiFile
$DataStamp = get-date -Format yyyyMMddTHHmmss
$logFile ="C:\" + '{0}-{1}.log' -f $file.name,$DataStamp
$MSIArguments = @(
    "/i"
    ('"{0}"' -f $file.fullname)
    "/qn"
    "/norestart"
    "/L*v"
    $logFile
)
Start-Process "msiexec.exe" -ArgumentList $MSIArguments -Wait -NoNewWindow

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How to Upgrade Kubernetes Ingress Nginx Deployed via Helm

# How to upgrade ingress-nginx: helm upgrade --reuse-values ingress-nginx ingress-nginx/ingress-nginx -n ingress-nginx # Sample output of a failure scenario: brucelee@k8-controller:~$ helm…

Incomplete VM Configuration

Quick Script: # fixIncompleteVmConfig.ps1 $IncompleteVMConfig=Get-SCVirtualMachine|?{$_.StatusString -eq 'Incomplete VM Configuration'} if($IncompleteVMConfig.count){ foreach($vm in $IncompleteVMConfig){ try{ write-host…

Hyper-V Guest VM CPU Compatibility Feature Down Side

Symptom: guest VM could not install applications that require'SSE4.2 and POPCNT instruction sets' Cause: The…