Preference window will not open

Is there a way via a snippet in the Ruby Console to reset the workspace? Maybe it’s just that the Preferences window is opening off screen.