{"id":503,"date":"2026-05-07T10:30:13","date_gmt":"2026-05-07T14:30:13","guid":{"rendered":"https:\/\/www.grumpyland.com\/blog\/?p=503"},"modified":"2026-05-07T10:37:48","modified_gmt":"2026-05-07T14:37:48","slug":"dell-ipmi-fan-control-from-windows","status":"publish","type":"post","link":"https:\/\/www.grumpyland.com\/blog\/503\/dell-ipmi-fan-control-from-windows\/","title":{"rendered":"Dell IPMI Fan Control (from Windows)"},"content":{"rendered":"\n<p>Is your Dell server too loud and sounds like you&#8217;re in a room with a jet engine?<\/p>\n\n\n\n<p>This is a small powershell script used to manually control fan speed on a Dell server (such as PowerEdge R730xd) from a Windows computer on the same network as the IPMI. By default, the fan speed control only goes down to 40%, which is often too loud for office or home usage. This program allows you to set any fan speed.<\/p>\n\n\n\n<p>Note: Manually lowering fan speed is not recommended if you&#8217;re using this server for high performance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install Intelligent Platform Management Interface (IPMI) tool Windows<\/h3>\n\n\n\n<p>You can download the latest IMP tool from Dell at: <a href=\"https:\/\/www.dell.com\/support\/home\/en-ca\/drivers\/driversdetails?driverid=m63f3\">https:\/\/www.dell.com\/support\/home\/en-ca\/drivers\/driversdetails?driverid=m63f3<\/a> and ensure that it&#8217;s compatible for your server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PowerShell Script<\/h3>\n\n\n\n<p>Save the following code as ipmi-fan-control.ps1 or any other name you like. Run it with powershell. It will prompt you for what speed you want. If it&#8217;s a very low power usage server, something like 20 will work fine.<\/p>\n\n\n\n<p>The setting will be saved even after you exit.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Hardcoded iDRAC credentials\n$ip = \"123.123.123.123\"\n$user = \"User\" # could use root\n$pass = \"Password\"\n\n# Path to ipmitool.exe (adjust if installed elsewhere)\n$ipmitool = \"C:\\ipmitool_1.8.18-dellemc_p001\\ipmitool.exe\"\n\n# Log file path (same folder as script)\n$logFile = Join-Path $PSScriptRoot \"ipmi-log.txt\"\n\n# Function to trim log file to 500 lines\nfunction Trim-Log {\n    if (Test-Path $logFile) {\n        $lines = Get-Content $logFile\n        if ($lines.Count -gt 500) {\n            $lines | Select-Object -Last 500 | Set-Content $logFile\n        }\n    }\n}\n\n# Prompt user for fan speed percentage, default to 40 if blank\n$fanPercentInput = Read-Host \"Enter desired fan speed percentage (0-100, default 40)\"\nif (&#91;string]::IsNullOrWhiteSpace($fanPercentInput)) {\n    $fanPercent = 40\n} elseif ($fanPercentInput -as &#91;int]) {\n    $fanPercent = &#91;int]$fanPercentInput\n} else {\n    Write-Host \"Invalid input. Please enter a number between 0 and 100.\" -ForegroundColor Red\n    exit\n}\n\nif ($fanPercent -lt 0 -or $fanPercent -gt 100) {\n    Write-Host \"Percentage must be between 0 and 100.\" -ForegroundColor Red\n    exit\n}\n\n# Convert percentage to hex value for IPMI (0\u2013100 decimal \u2192 hex byte)\n$fanHex = \"{0:X2}\" -f $fanPercent\n\n# Put fans into manual mode\n&amp; $ipmitool -I lanplus -H $ip -U $user -P $pass raw 0x30 0x30 0x01 0x00\n\n# Set fans to chosen PWM\n&amp; $ipmitool -I lanplus -H $ip -U $user -P $pass raw 0x30 0x30 0x02 0xff 0x$fanHex\n\nWrite-Host \"Fans set to $fanPercent% PWM. Monitoring sensors...\"\nAdd-Content $logFile \"=== Fan control started at $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') with $fanPercent% PWM ===\"\nTrim-Log\n\nwhile ($true) {\n    ##Clear-Host\n    $timestamp = Get-Date -Format \"yyyy-MM-dd HH:mm:ss\"\n    Write-Host \"=== Monitoring Cycle at ${timestamp} ===`n\"\n\n    # Query all SDR sensors once\n    $sensorData = &amp; $ipmitool -I lanplus -H $ip -U $user -P $pass sdr\n\n    # Separate temps and fans\n    $temps = $sensorData | Where-Object { $_ -match \"Temp\" }\n    $fans  = $sensorData | Where-Object { $_ -match \"Fan\" }\n\n    Write-Host \"=== Temperature Sensors ===\"\n    $temps | ForEach-Object { Write-Host $_ }\n\n    Write-Host \"`n=== Fan Speeds ===\"\n    $fans | ForEach-Object { Write-Host $_ }\n\n    # Log to file\n    Add-Content $logFile \"`n=== Cycle at ${timestamp} ===\"\n    $temps | ForEach-Object { Add-Content $logFile $_ }\n    $fans  | ForEach-Object { Add-Content $logFile $_ }\n    Trim-Log\n\n    # Extract numeric temperature values from second column\n    $cpuHot = $temps | Where-Object { $_ -match \"CPU\" -or $_ -match \"Temp\" } | ForEach-Object {\n        $parts = $_ -split \"\\|\"\n        $value = $parts&#91;1].Trim()\n        if ($value -match \"(&#91;0-9]+)\") { &#91;int]$matches&#91;1] }\n    } | Where-Object { $_ -gt 50 }\n\n    if ($cpuHot) {\n        Write-Host \"`n*** ALERT: CPU exceeded 50\u00b0C! Restoring auto fan mode... ***\" -ForegroundColor Red\n        Add-Content $logFile \"*** ALERT at ${timestamp}: CPU exceeded 50\u00b0C. Restoring auto mode. ***\"\n        Trim-Log\n        &amp; $ipmitool -I lanplus -H $ip -U $user -P $pass raw 0x30 0x30 0x01 0x01\n        break\n    }\n\n    Start-Sleep -Seconds 2\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">How to fix &#8220;running scripts is disabled on this system&#8221;?<\/h2>\n\n\n\n<p>If you can&#8217;t run the ps1 script because of this error, you need to allow your powershell to be able to execute ps1 scripts to begin with.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open PowerShell as Administrator<\/li>\n\n\n\n<li>Run this command in PowerShell<br \/><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned<\/code><\/pre>\n\n\n\n<p>3. Enter Y<\/p>\n\n\n\n<p>From now on, your PowerShell should be able to execute scripts made locally all the time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is your Dell server too loud and sounds like you&#8217;re in a room with a jet engine? This is a small powershell script used to manually control fan speed on a Dell server (such as PowerEdge R730xd) from a Windows computer on the same network as the IPMI. By default, the fan speed control only [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":508,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_vp_format_video_url":"","_vp_image_focal_point":[],"footnotes":""},"categories":[15],"tags":[80,82,81,16],"class_list":["post-503","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-dell-server","tag-fan-control","tag-ipmi","tag-windows"],"_links":{"self":[{"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/posts\/503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/comments?post=503"}],"version-history":[{"count":3,"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/posts\/503\/revisions"}],"predecessor-version":[{"id":509,"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/posts\/503\/revisions\/509"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/media\/508"}],"wp:attachment":[{"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/media?parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/categories?post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.grumpyland.com\/blog\/wp-json\/wp\/v2\/tags?post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}