po-temkin's Posts

Hello to everyone I want to edit Recovery Password for my Horizon Connection Server. Below, you can see a couple of functions that should do this. But instead of a successful result, I see an error:... See more...
Hello to everyone I want to edit Recovery Password for my Horizon Connection Server. Below, you can see a couple of functions that should do this. But instead of a successful result, I see an error: PS C:\Windows\system32> $Password = '12345678' PS C:\Windows\system32> $Password = ConvertTo-SecureString -String $Password -AsPlainText -Force PS C:\Windows\system32> Set-HvRecoveryPasswordExt -Password $Password Exception calling "GlobalSettings_Update" with "1" argument(s): "ExceptionType : VMware.Hv.InvalidArgument ErrorMessage : Invalid recovery password hash. ParameterName : dataRecoveryPasswordData" At C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper.Ext\VMware.Hv.Helper.Ext.psm1:1627 char:5 + $services.GlobalSettings.GlobalSettings_Update($updates) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : VimException RecoveryPasswordSHA256 RecoveryPasswordHint ---------------------- -------------------- {123, 35, 45, 65...}   What's wrong with my approach? P.S: Documentation page https://developer.vmware.com/apis/1696/view function Set-HvRecoveryPasswordExt { param( [Parameter(Mandatory = $true)] [securestring] $Password, [Parameter(Mandatory = $false)] [string] $Hint ) begin { $services = Get-ViewAPIService -hvServer $hvServer if ($null -eq $services) { Write-Error "Could not retrieve ViewApi services from connection object" break } } process { $tempPassword = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password) $plainePassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($tempPassword) $Stream = [IO.MemoryStream]::new([byte[]][char[]]$plainePassword) $SHA256 = (Get-FileHash -InputStream $Stream -Algorithm SHA256).Hash $SHA256Bytes = [System.Text.Encoding]::UTF8.GetBytes($SHA256) $GlobalSettingsDataRecoveryPasswordData = New-Object VMware.Hv.GlobalSettingsDataRecoveryPasswordData -Property @{ recoveryPasswordSHA256 = $SHA256Bytes recoveryPasswordHint = $Hint } $updates = Get-MapEntryExt -Key dataRecoveryPasswordData -Value $GlobalSettingsDataRecoveryPasswordData $services.GlobalSettings.GlobalSettings_Update($updates) } end { return $updates [System.gc]::collect() } }  
Hi everyone In our production i using Ansible to run PowerCLI scripts using win_shell. It is equal to run script localy. But each execution running in new PowerShell session and every time i see so... See more...
Hi everyone In our production i using Ansible to run PowerCLI scripts using win_shell. It is equal to run script localy. But each execution running in new PowerShell session and every time i see some time lag which occurring because module importing. Can I import HvHelper module once and for all?
It was a very specific and interesting task but we finally resolve this problem yesterday. After many different test on different VMs we understood that problem occur because group policies. Not wit... See more...
It was a very specific and interesting task but we finally resolve this problem yesterday. After many different test on different VMs we understood that problem occur because group policies. Not without lucky we found definite policy which corrupted installation process. To automate some tasks I installed PowerCLI on Horizon VM. Because our production VMs don't have internet connection the fisrt run of PowerCLI script took a long time. Usually PowerCLI scripts run through Ansible and each new task execute in new powershell session what created sensible time lag. To resolve this problem we created policy which off two parameters in IE: Check for publisher's certificate revocation Check for server sertificate revocation Because group policy haven't option for first parameter we found suitable value in registry hive HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing. We don't know how it happened but we found value REG_DWORD 0x146B44. And this value was wrong. According to this link we needed 0x00023e00. After changing this value installation completed successfully.
You aren't correct because i'm trying to install first instance. Another instances wich I have aren't relate with this installation
Only Kaspersky as you can see on screenshot. But this isn't a first horizon installation. We have another installations and earlie everything was ok. My last installation attempt was couple of mont... See more...
Only Kaspersky as you can see on screenshot. But this isn't a first horizon installation. We have another installations and earlie everything was ok. My last installation attempt was couple of month ago and everthing that changed are some windows updates.
1) Yes 2) This is a first CS in cluster 3) Yes 4) Yes 5) Yes
Hello for everyone I trying to install Horizon Connection Server 2212 on fresh Win Server 2019 but catch this error Is anyone seen something like this? Some messages from adamsetup.log: adamset... See more...
Hello for everyone I trying to install Horizon Connection Server 2212 on fresh Win Server 2019 but catch this error Is anyone seen something like this? Some messages from adamsetup.log: adamsetup 83C.15C8 0415 11:57:19.529 Enter ImportLDIFFile adamsetup 83C.15C8 0416 11:57:19.529 Enter State::GetMyLDAPPort 389 adamsetup 83C.15C8 0417 11:57:19.529 Enter State::UseRemoteCreds false adamsetup 83C.15C8 0418 11:57:19.529 Running ldifde.exe -i -h -w 300 -j . -s localhost:389 -f MS-ADAM-Upgrade-2.ldf -$ "adamschema.cat" adamsetup 83C.15C8 0419 11:57:19.529 Enter State::GetMyDir C:\Windows\ADAM adamsetup 83C.15C8 041A 11:57:34.605 ldifde.exe returned with error code 0x80092026 adamsetup 83C.15C8 041B 11:57:34.605 Enter State::SetFinishMessage AD LDS Setup did not complete because one or more LDIF files could not be imported successfully. adamsetup 83C.15C8 041C 11:57:34.605 Enter State::SetFinishError adamsetup 83C.15C8 041D 11:57:34.605 Enter Feedback::ShowMessage Undoing installation...