VMware Cloud Community
dwchan
Enthusiast
Enthusiast
Jump to solution

"This operation requires an interactive window station" error on Windows 10

I am using the following PS / PowerCLI on a windows 2016 without issue

 My-Logger "Start Post OS installation..."
$DCLocalUser = "$strVMName\newadmin"
$DCLocalPWord = ConvertTo-SecureString -String 'VMware1!' -AsPlainText -Force
$DCLocalCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $DCLocalUser, $DCLocalPWord

My-Logger "Install and configure VMware Horizon Agent..."
$ConfigureHorizonAgent = 'Write-Verbose -Message "Configuring VMware Horizon Agent" -Verbose;
$HorizonAgent = "VMware-Horizon-Agent-x86_64-7.13.0-16975066.exe";
$HorizonAgentConfig = "/s /v ""/qn REBOOT=ReallySuppress ADDLOCAL=Core,RTAV,ClientDriveRedirection,VmwVaudio""";
Start-Process "D:\CustomFolder\VMware_HAgent\$HorizonAgent" -ArgumentList $HorizonAgentConfig -PassThru -Wait -ErrorAction Stop'
Invoke-VMScript -ScriptText $ConfigureHorizonAgent -VM $strVMName -GuestCredential $DCLocalCredential

However, when I am testing this out on a Windows 10 build, I am getting the following error

ScriptOutput
-----------------------------------------------------------------------------------------------------------------------|
VERBOSE: Configuring VMware Horizon Agent
| Start-Process : This command cannot be run due to the error: This operation requires an interactive window station.
| At line:4 char:21
| + ... Start-Process "D:\CustomFolder\VMware_HAgent\$HorizonAgen ...
| + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
| + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Is there something else I need to enable on the Windows 10 VM before I can use the Invoke-VMScript command?

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I would first check if UAC is enabled on those Win10 stations.
Then, when your security officer agrees, try disabling it.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

I suspect the remark about the "interactive window" is due to the UAC prompt.
Do you have a policy in place that forces UAC to be enabled on Windows 10 stations?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
dwchan
Enthusiast
Enthusiast
Jump to solution

So I need to disabled UAC? or enabled it?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

I would first check if UAC is enabled on those Win10 stations.
Then, when your security officer agrees, try disabling it.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
dwchan
Enthusiast
Enthusiast
Jump to solution

Thank you, you nailed it on the head.  I disabled UAC on the registry and it seem to fixed the problem.  Now need to figure out should I disabled this by reg add or part of unattend.xml entries during the build.

Reply
0 Kudos