🖼️Как установить агента ManageEngine Patch Manager? param ( [parameter(Mandatory = $false, HelpMessage = "Enter the AD host short name")] [string]$listOfHosts = 'SRV01 SRV02', [parameter(Mandatory = $false, HelpMessage = "Enter the AD search base")] [string]$ADsearchBase = 'DC=example,DC=com', [parameter(Mandatory = $false, HelpMessage = "Enter the URL to download the ME agent without an OS type")] [string]$url = '<patch managemnet url>' ) $url += "&os=windows" $preparedList = @() $listOfHosts.Trim().ToUpper().Split([Environment]::NewLine,[System.StringSplitOptions]::RemoveEmptyEntries) | ForEach-Object { if (![string]::IsNullOrEmpty($_)) { $preparedList += [string]$_.Trim() } } $preparedList = $preparedList | Sort-Object | Get-Unique Write-Host "`nTotal entries: $($preparedList.count) `nList of entries:" -ForegroundColor Green $preparedList $preparedList | ForEach-Object { [string]$ADfilter = ('Enabled -eq $true -and Name -eq "{0}"' -f $_)