Powershell Query pasted below. Incase If you guys wanted it.
while ($true)
{
$Date = Get-Date -DisplayHint Date -Format MM/dd/yyyy
$Time = Get-date -DisplayHint Time -Format HH:MM:ss
$SystemMemory= Get-WmiObject -Class win32_operatingsystem
$TotalMemory_GB=[math]::Round(((($SystemMemory.TotalvisibleMemorySize)/1024)/1024),2)
$FreeMemory_GB=[math]::Round(((($SystemMemory.freephysicalmemory)/1024)/1024),2)
$MemUsedPercent= [math]::Round(((($TotalMemory_GB-$FreeMemory_GB)/$TotalMemory_GB)*100),2)
$computerCPU =(Get-WmiObject -Class win32_processor -ErrorAction Stop | Measure-Object -Property LoadPercentage -Average | Select-Object Average).Average
#$Date
#$Time
#$computerCPU
#$TotalMemory_GB
#$FreeMemory_GB
#$MemUsedPercent
$endpoint = "https://api.powerbi.com/beta/de08c407..."
$payload = @{
"date" =$Date
"time" =$Time
"TotalMemory_GB" =$TotalMemory_GB
"AvailMemory_GB" = $FreeMemory_GB
"Used_percentage" =$MemUsedPercent
"CPU" =$computerCPU
}
Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload))
}