Help needed: Connecting to Nutanix Prism API using PowerShell 5.1

​

Hi everyone,

I'm trying to connect to a Nutanix Prism environment using PowerShell in order to list the VMs through the Nutanix REST API.

My environment:

Windows PowerShell 5.1

PowerShell is running in Constrained Language Mode

Nutanix Prism on https://<prism-server>:9440

I'm trying to use the Nutanix v3 API

Endpoint: /api/nutanix/v3/vms/list

Initially, I tried Invoke-RestMethod with -Credential, but I received:

401 AUTHENTICATION REQUIRED "Invalid cookies present in the request"

I then tried to use Basic Authentication manually, but PowerShell's Constrained Language Mode blocks .NET methods such as:

\[Convert\]::ToBase64String() \[System.Net.ServicePointManager\]::ServerCertificateValidationCallback

I also have curl.exe available:

curl 8.21.0

So I tried:

curl.exe -k -u "USERNAME" \` "https://<prism-server>:9440/api/nutanix/v3/vms/list" \` -X POST \` -H "Content-Type: application/json" \` -d '{"kind":"vm"}'

However, when running this from PowerShell ISE, it seems to hang after displaying:

Connexion à Nutanix...

My goal is simply to authenticate and retrieve a list of VMs (name + UUID). I don't need to perform any modification on the Nutanix environment.

Has anyone successfully used the Nutanix v3 REST API from PowerShell 5.1 under Constrained Language Mode? What's the recommended authentication method in this situation?

Thanks!

reddit.com
u/Mcm_Sys — 12 days ago

Help needed: Connecting to Nutanix Prism API using PowerShell 5.1

Hi everyone,

I'm trying to connect to a Nutanix Prism environment using PowerShell in order to list the VMs through the Nutanix REST API.

My environment:

Windows PowerShell 5.1

PowerShell is running in Constrained Language Mode

Nutanix Prism on https://<prism-server>:9440

I'm trying to use the Nutanix v3 API

Endpoint: /api/nutanix/v3/vms/list

Initially, I tried Invoke-RestMethod with -Credential, but I received:

401 AUTHENTICATION REQUIRED "Invalid cookies present in the request"

I then tried to use Basic Authentication manually, but PowerShell's Constrained Language Mode blocks .NET methods such as:

[Convert]::ToBase64String() [System.Net.ServicePointManager]::ServerCertificateValidationCallback

I also have curl.exe available:

curl 8.21.0

So I tried:

curl.exe -k -u "USERNAME" ` "https://<prism-server>:9440/api/nutanix/v3/vms/list" ` -X POST ` -H "Content-Type: application/json" ` -d '{"kind":"vm"}'

However, when running this from PowerShell ISE, it seems to hang after displaying:

Connexion à Nutanix...

My goal is simply to authenticate and retrieve a list of VMs (name + UUID). I don't need to perform any modification on the Nutanix environment.

Has anyone successfully used the Nutanix v3 REST API from PowerShell 5.1 under Constrained Language Mode? What's the recommended authentication method in this situation?

Thanks!

reddit.com
u/Mcm_Sys — 12 days ago

Issue with refund in pearsonvue

I cancelled my ms-102 exam in pearson vue in 9 aug and Till now I didnt receive refund email or my money in my bank account, I contacted them via chat live, honestly it's a pain I dont know if it's an AI agent or a real person, it keeps asking and asking for the informations and in the end he asks u to call the service !!! Calling the service is very exepensive in country!!! Does anyone have an email to contact them or via whatsapp??

reddit.com
u/Mcm_Sys — 2 months ago
▲ 6 r/Intune

Get-AutopilotDiagnostics -Online → AADSTS700016, then Get-AutopilotDiagnostics2 -Online → 403 Forbidden

Hi everyone,

I'm troubleshooting an issue with Windows Autopilot + Microsoft Graph PowerShell in my lab.

1. Original issue — Get-AutopilotDiagnostics -Online

When I run:

Get-AutopilotDiagnostics -Online

I get:

AADSTS700016:
Application with identifier
'd1ddf0e4-d672-4dae-b554-9d5bdfd93547'
was not found in the directory.

I understand this is related to the application used by the original diagnostics script.

I therefore moved to the newer:

Get-AutopilotDiagnostics2.ps1 -Online

2. New issue — Get-AutopilotDiagnostics2 -Online

The new script successfully authenticates:

Connected to tenant
Getting list of apps
Getting list of scripts

So authentication itself appears to be working.

However, I then receive:

Get-IntuneObjects :
Microsoft.Graph.PowerShell.Authentication.Helpers.HttpResponseException:
Response status code does not indicate success: Forbidden (Forbidden).

The error occurs when the script tries to access Microsoft Graph Intune endpoints such as:

https://graph.microsoft.com/beta/deviceAppManagement/mobileApps
https://graph.microsoft.com/beta/deviceManagement/...

3. My App Registration permissions

In Entra ID App Registration I granted Microsoft Graph delegated permissions.

Currently I have:

DeviceManagementConfiguration.ReadWrite.All
DeviceManagementManagedDevices.ReadWrite.All
DeviceManagementScripts.ReadWrite.All
DeviceManagementServiceConfig.ReadWrite.All
Group.Read.All
User.Read

Admin consent has been granted.

4. Redirect URI configuration

I also checked the Authentication → Redirect URI configuration of my App Registration.

Currently, I have:

Web:

https://login.microsoftonline.com/common/oauth2/nativeclient

and Mobile and desktop applications:

urn:ietf:wg:oauth:2.0:oob

What I'm trying to understand

It looks like I have moved from an authentication problem (AADSTS700016) with the original script to an authorization problem (403 Forbidden) with Get-AutopilotDiagnostics2.ps1.

My questions are:

  1. Does Get-AutopilotDiagnostics2.ps1 -Online require additional Microsoft Graph permissions?
  2. Are there any other permissions required by the script?
  3. Are the Redirect URIs shown above correct for Microsoft Graph PowerShell?
  4. Is there a recommended configuration for using Get-AutopilotDiagnostics2.ps1 -Online with a custom Entra ID App Registration?
  5. Has anyone successfully used this script recently with their own App Registration?

I'm especially interested in understanding whether the 403 Forbidden is caused by missing Graph permissions, the App Registration configuration, or something else in the new diagnostics script.

Any help from someone who has already configured this would be greatly appreciated!

reddit.com
u/Mcm_Sys — 2 months ago
▲ 0 r/Intune

Intune macOS enrollment in a VMware lab environment – testing purpose

Hi everyone,

I'm currently building a VMware lab environment to test Microsoft Intune macOS enrollment and management.

The purpose is strictly testing and learning, not production use.

I'm running macOS Sonoma 14.3 (23D56) as a VMware virtual machine on an AMD Ryzen host. I'm trying to use this VM as a test device for Intune enrollment and to validate things such as:

  • macOS enrollment in Intune
  • Configuration profiles
  • Compliance policies
  • Conditional Access
  • Application deployment
  • Device management and reporting

The VMware VM currently boots macOS, but I'm encountering a kernel panic/restart after following this article: https://github.com/DavidsonRafaelK/MacOS-Installation 

Has anyone here successfully used a macOS VMware VM as an Intune test device?

If so:

  1. Is macOS running in VMware suitable for basic Intune enrollment testing?
  2. Are there any limitations with Intune when the macOS device is virtualized?
  3. Are there specific macOS/VMware settings required for enrollment to work correctly?
  4. Is there anything I should be aware of regarding device identity, certificates, compliance, or Conditional Access?

Again, this is only for a personal lab/testing environment to learn and validate Intune functionality.

Thanks in advance for any advice or experience you can share.

u/Mcm_Sys — 2 months ago
▲ 2 r/Intune

Intune Secure Boot compliance fails with 2016345708 (SyncML 404) although Secure Boot is enabled

Hi everyone,

I'm testing an Intune compliance policy on a Windows 11 24H2 VM (OS Build 10.0.26100.8875) running on VMware Workstation. The policy only requires Secure Boot and TPM. Confirm-SecureBootUEFI returns True, msinfo32 shows BIOS Mode: UEFI and Secure Boot State: On, and TPM is compliant.

However, Intune always reports

Secure Boot: 2016345708 (SyncML(404): The requested target was not found.)

I've already tried:

  • Multiple Intune syncs (Settings and PowerShell)
  • Rebooting the VM
  • Verifying TPM Health Attestation
  • Running the Tpm-HASCertRetr scheduled task
  • Confirming Secure Boot is enabled in VMware

Has anyone experienced this on Windows 11 24H2 (10.0.26100.8875) with VMware Workstation? Is this a VMware limitation, a Windows issue, or an Intune bug? Any insights or workarounds would be greatly appreciated.

reddit.com
u/Mcm_Sys — 2 months ago
▲ 1 r/Intune

Intune Device Restrictions: Gaming is blocked, but Ease of Access still appears in Windows Settings

Hi everyone,

I'm testing an Intune Device Restrictions policy on a Windows 10 VM.

In my policy under Control Panel and Settings, I configured:

  • Gaming = Block
  • Ease of Access = Block

The policy is successfully assigned to my test device, and Intune reports that it was applied.

However, after syncing the device:

  • ✅ The Gaming category is completely removed from Windows Settings.
  • ❌ The Ease of Access category is still visible in Windows Settings.

I've already:

  • Synced the device multiple times.
  • Confirmed the policy status is Succeeded in Intune.
  • Restarted the device.

I'm wondering:

  1. Is this expected behavior?
  2. Does the Ease of Access setting only block access to the page's functionality instead of hiding the category?
  3. Is this a limitation or bug in the Windows Settings Page Visibility CSP?
  4. Has anyone else experienced the same issue?

Any insights would be appreciated. Thanks!

reddit.com
u/Mcm_Sys — 3 months ago