Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Host.php

function Host::getWindowsId

File

vendor/open-telemetry/sdk/Resource/Detectors/Host.php, line 91

Class

Host

Namespace

OpenTelemetry\SDK\Resource\Detectors

Code

private function getWindowsId() : ?string {
    $out = exec('powershell.exe -Command "Get-ItemPropertyValue -Path HKLM:\\SOFTWARE\\Microsoft\\Cryptography -Name MachineGuid"');
    if ($out !== false) {
        return $out;
    }
    return null;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal