I have a windows instance without public IP, installed the monitoring agent using the below powershell command:
Launch Powershell as administrator and run the below command:
(New-Object Net.WebClient).DownloadFile("https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.ps1", "${env:UserProfile}\add-google-cloud-ops-agent-repo.ps1")
Invoke-Expression "${env:UserProfile}\add-google-cloud-ops-agent-repo.ps1 -AlsoInstall"
It got installed successfully and the service is running, when I check from the GCP console under monitoring section, it is showing as agent not installed.