Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
    • All guides
        • Testing the agent
        • Installing the agent
        • Resetting the admin password
        • Deleting the agent
    • Viewing operations with resources
    • Viewing metrics Monitoring
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Metrics Monitoring
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. VMs
  3. Password reset agent
  4. Installing the agent

Installing the password reset agent on a Windows Server VM

Written by
Yandex Cloud
Updated at February 12, 2025
View in Markdown

To reset user passwords on Windows Server VMs using Yandex Cloud, install the password reset agent and its updater.

Note

Currently, you cannot reset a password on a Linux VM using Yandex Cloud tools.

To install the agent, use the agent updater. The agent source code is available on GitHub.

To deploy the agent and configure its automatic updates:

  1. Connect to the VM via RDP.

  2. Download and set up the agent updater:

    PowerShell
    1. Get the number of the updater's latest version:

      $YCAgentUpdaterBaseUri = "https://storage.yandexcloud.net/yandexcloud-guestagent-updater"
      $YCAgentUpdaterVersion = (Invoke-RestMethod "$YCAgentUpdaterBaseUri/release/stable").Trim()
      
    2. Download the updater and verify its checksum:

      $YCAgentUpdaterDir = "C:\Program Files\Yandex.Cloud\Guest Agent Updater"
      New-Item -Path $YCAgentUpdaterDir -ItemType "directory"
      
      $p = @{
        Uri = "$YCAgentUpdaterBaseUri/release/$YCAgentUpdaterVersion/windows/amd64/guest-agent-updater.exe"
        OutFile = "$YCAgentUpdaterDir\guest-agent-updater.exe"
      }
      Invoke-RestMethod @p
      
      $YCAgentUpdaterHashOrig = (Invoke-RestMethod "$YCAgentUpdaterBaseUri/release/$YCAgentUpdaterVersion/windows/amd64/guest-agent-updater.exe.sha256").Trim()
      $YCAgentUpdaterHashCopy = (Get-Filehash -Path "$YCAgentUpdaterDir\guest-agent-updater.exe" -Algorithm SHA256 | Select-Object -ExpandProperty Hash).ToLower()
      if ($YCAgentUpdaterHashOrig -eq $YCAgentUpdaterHashCopy) {
        Write-Host "Agent updater checksum verified"
      } else {
        Write-Host "Agent updater checksum NOT verified"
      }
      

      Result:

      Agent updater checksum verified
      
    3. Install the agent:

      & $YCAgentUpdaterDir\guest-agent-updater.exe update
      
    4. Make sure the agent is installed as a service and the service is running:

      Get-Service "yc-guest-agent"
      

      Result:

      Status   Name               DisplayName
      ------   ----               -----------
      Running  yc-guest-agent     yc-guest-agent
      

      The service status must be Running.

    5. If the service is not running, run it:

      Start-Service "yc-guest-agent"
      

      To make sure the service is running, repeat step 4.

    6. Set up a job to update the agent weekly at a random time:

      $YCAgentUpdaterLogFilepath = "C:\Windows\Temp\guest-agent-updater.log"
      $p = @{
        Execute = 'C:\Windows\System32\cmd.exe'
        Argument = "/c `"$YCAgentUpdaterDir\guest-agent-updater.exe`" update --log-level debug > $YCAgentUpdaterLogFilepath"
      }
      $YCAgentUpdaterAction = New-ScheduledTaskAction @p
      
      $RandomWeekdayNumber = Get-Random -Minimum 0 -Maximum 6
      $DaysOfWeek = @("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
      $RandomWeekday = $DaysOfWeek[$RandomWeekdayNumber]
      
      $RandomHour = Get-Random -Minimum 0 -Maximum 23
      $RandomMinute = Get-Random -Minimum 0 -Maximum 59
      $RandomSecond = Get-Random -Minimum 0 -Maximum 59
      $p = @{
        Weekly = $true
        At = ([datetime]::Today).AddHours($RandomHour).AddMinutes($RandomMinute).AddSeconds($RandomSecond)
        RandomDelay = New-TimeSpan -Hours 24 # with huge random delay
        DaysOfWeek = $RandomWeekday
       }
      $YCAgentUpdaterTrigger = New-ScheduledTaskTrigger @p
      
      $YCAgentUpdaterTaskName = "yc-guest-agent-updater"
      $p = @{
        TaskName = $YCAgentUpdaterTaskName
        Action = $YCAgentUpdaterAction
        User = 'System'
        RunLevel = 'Highest'
        Trigger = $YCAgentUpdaterTrigger
      }
      Register-ScheduledTask @p | Out-Null
      
    7. Run the job:

      Get-ScheduledTask -TaskName $YCAgentUpdaterTaskName | Start-ScheduledTask
      
      $Timeout = 30
      $Deadline = ([datetime]::Now).AddSeconds($timeout)
      
      while ((Get-ScheduledTask $YCAgentUpdaterTaskName).State -ne "Ready") {    
        Start-Sleep -Seconds 1
      
        if ([datetime]::Now -gt $Deadline) {
          Write-Host "Deadline exceeded"
          break
        }
      }
      

Was the article helpful?

Previous
Testing the agent
Next
Resetting the admin password
© 2026 Direct Cursus Technology L.L.C.