Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms


windows_screenresolution (10) Versions 1.0.4

Sets headless screen resolution on Windows

cookbook 'windows_screenresolution', '= 1.0.4'
cookbook 'windows_screenresolution', '= 1.0.4', :supermarket
knife cookbook site install windows_screenresolution
knife cookbook site download windows_screenresolution
Quality 75%

Windows Screen Resolution Cookbook

Cookbook Version Build Status

Sets headless screen resolution on Windows.

It does this by:

  • creating a new user called rdp_local
  • creating a startup script to RDP into the specified user account at specified resolution (default is 1920x1080)
  • adding a firewall rule to open RDP port 3389
  • configuring auto-logon to login as rdp_local on reboot

Note that auto-logon requires a username and password and that the password is stored unencrypted under windows registry HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.

Tested on Amazon Windows Server 2012 R2 AMI.


  • Chef 11.6+ (registry_key resource)
  • Windows Server 2008 R2+ (due to usage of window_home)


  • Windows


  • windows_autologin
  • windows_home


Include default recipe in run list or in another cookbook to set the screen resolution. The username and password must be set in order to user this cookbook.


  • node['windows_screenresolution']['username'] - Username of account to remote login as (required).
  • node['windows_screenresolution']['password'] - Password of account to remote login as (required).
  • node['windows_screenresolution']['width'] - Display width in pixels. Defaults to 1920.
  • node['windows_screenresolution']['height'] - Display height in pixels. Defaults to 1080.
  • node['windows_screenresolution']['target'] - Identifies the computer or domain name that username and password account will be associated with for remote login. Defaults to localhost.
  • node['windows_screenresolution']['rdp_autologon'] - Logon as RDP user automatically on reboot. Defaults to true. Note that the password is stored unencrypted under windows registry HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.
  • node['windows_screenresolution']['rdp_username'] - RDP username. Defaults to rdp_local.
  • node['windows_screenresolution']['rdp_password'] - RDP password. Defaults to password of account to remote login as, if nil.
  • node['windows_screenresolution']['rdp_domain'] - RDP domain. Defaults to nil.


Set newuser's screen resolution to 1920x1080 (default)

node.override['windows_screenresolution']['username'] = 'newuser'
node.override['windows_screenresolution']['password'] = 'N3wPassW0Rd'

include_recipe 'windows_screenresolution::default'

Set newuser's screen resolution to 1366x768

node.override['windows_screenresolution']['username'] = 'newuser'
node.override['windows_screenresolution']['password'] = 'N3wPassW0Rd'
node.override['windows_screenresolution']['width'] = 1366
node.override['windows_screenresolution']['height'] = 768

include_recipe 'windows_screenresolution::default'

Getting Help


Please refer to CONTRIBUTING.


MIT - see the accompanying LICENSE file for details.



  • Fix #6 WARN: node.set is deprecated and will be removed in Chef 14
  • Fix #5 NoMethodError when password is nil on non-windows platform


  • Fix #3 Cannot handle percent character in password


  • Fix #2 Multiple rdp_local directories are created under C:\Users


  • Fix #1 Cannot create directory due to insufficient permissions


  • Initial release

Collaborator Number Metric

1.0.4 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Foodcritic Metric

1.0.4 passed this metric

License Metric

1.0.4 passed this metric

Publish Metric

1.0.4 passed this metric