DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Zero-Touch Patch Management With PowerShell and Intune: How We Automated Compliance at Scale
  • Multiplatform Directory Bookmarks on the Command Line
  • Effective Secrets Management: Retrieving Secrets From Azure Key Vault With Powershell Script
  • Apache Ranger and AWS EMR Automated Installation and Integration Series (5): Windows AD + Open-Source Ranger

Trending

  • Member Spotlight: Shai Almong
  • How to Build Your Own AI SRE From Scratch
  • Introduction to Error Prone: How to Catch Bugs at Compile Time
  • How to Migrate From C/C++ to Rust: A Practical Guide for Embedded IoT Systems

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Coding
  3. Languages
  4. Windows PowerShell & ColdFusion Setup

Windows PowerShell & ColdFusion Setup

By 
Steve Good
·
Mar. 31, 11 · News
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
8.7K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

I recently found the Windows PowerShell and can't stop using it. I've setup a couple of helper functions to let me start CF from a simple command in the console.

Before you can do anything you need to create a profile script. From within PowerShell you can run

$profile

to get the expected location for your profile. If you don't already have the file create it now. You will also need to tell PowerShell that it is ok to execute the new script by running

Set-ExecutionPolicy Unrestricted

You can, and should, read more about script execution.

If you have the standard ColdFusion install you can try this script (note: you should change line 1 to point at your correct ColdFusion install, my example shows CF9):

new-alias jrun "C:\ColdFusion9\runtime\bin\jrun.exe"
function cf($server="coldfusion"){
jrun -start $server
}

Using MultiServer? Try adding this to your profile script:

new-alias jrun "C:\JRun4\bin\jrun.exe"
function cf($server="cfusion"){
jrun -start $server
}

Now, in the console, you can start your default CF servers by simply typing

cf 

If you want to use something other than the default server, like when using multiserver, you can type

cf myserver

or

cf -server myserver

To stop the server just type

Ctrl+C

Happy PowerShell scripting!

PowerShell

Published at DZone with permission of Steve Good. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Zero-Touch Patch Management With PowerShell and Intune: How We Automated Compliance at Scale
  • Multiplatform Directory Bookmarks on the Command Line
  • Effective Secrets Management: Retrieving Secrets From Azure Key Vault With Powershell Script
  • Apache Ranger and AWS EMR Automated Installation and Integration Series (5): Windows AD + Open-Source Ranger

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook