Get cpu load of remote server using uipath

Hi,

Im trying to get the cpu load of the server machine using UiPath.
How is it possible to achieve this using powershell script & what are the prerequisites like admin rights needed etc to achieve the same.

Hi @RPA24

Check this manually first,

Try below workflow,

Note: No admin rights needed, but might be some organizational rules applied

where to pass server name in this context.. just fyi im using v5.0 for powershell wmi

I use the following PS scripts to monitor whether remote server security log space reaches its warning size. You can modify -ArgumentList to get CPU info.
Furthermore, I have tried to calculate the average cpu load in a certain duration with PowerShell code. And I did it on local machine, but failed on remote. May be it can be solve by storing the data into database, and then calculate the average.

"$Username = 'Administrator'"+vbcr+
"$Password = 'XXXXXXX'"+vbcr+
"$pass = ConvertTo-SecureString -AsPlainText $Password -Force"+vbcr+
"$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList $Username,$pass"+vbcr+
"Invoke-Command 192.168.1.1 -ScriptBlock { "+vbcr+
"$tempFile = [System.IO.Path]::GetTempFileName()"+vbcr+
"Start-Process PowerShell -ArgumentList ""Get-WinEvent -ListLog Security | ConvertTo-Json | Out-File $tempFile"" -Verb RunAs -Wait"+vbcr+
"if (Test-Path $tempFile) {"+vbcr+
"Get-Content $tempFile"+vbcr+
"Remove-Item $tempFile"+vbcr+
"} else { Write-Host ""cannot find the temp file, it may be failed""}"+vbcr+
"} -credential $Cred"