utZUY++jwww!fI@CgxIoZ26I+s_hz lb dnzb4v8DL.eD-X4NAMNL23sEP7j-KB function Test-PendingReboot { if (Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -EA Ignore) { return $true } if (Get-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -EA Ignore) { return $true } if (Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Name PendingFileRenameOperations -EA Ignore) { return $true } try { $util = [wmiclass]"\\.\root\ccm\clientsdk:CCM_ClientUtilities" $status = $util.DetermineIfRebootPending() if (($null -ne $status) -and $status.RebootPending) { return $true } } catch { } return $false } Test-PendingReboot Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco source add -n=vdschoco -s="https://vdschoco.deploy.vds.netapp.com/api/v2/" $address = "vbq-h5gw.vbq.cloudworkspace.app" choco upgrade ntap_myrtille -Y --force --params="'/h5gwAddress:$address'"