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
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • 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
  • Apache Ranger and AWS EMR Automated Installation and Integration Series (3): Windows AD + EMR-Native Ranger

Trending

  • Concourse CI/CD Pipeline: Webhook Triggers
  • Medallion Architecture: Why You Need It and How To Implement It With ClickHouse
  • Mastering Advanced Traffic Management in Multi-Cloud Kubernetes: Scaling With Multiple Istio Ingress Gateways
  • DGS GraphQL and Spring Boot
  1. DZone
  2. Coding
  3. Languages
  4. Windows PowerShell & ColdFusion Setup

Windows PowerShell & ColdFusion Setup

By 
Steve Good user avatar
Steve Good
·
Mar. 31, 11 · News
Likes (0)
Comment
Save
Tweet
Share
8.4K Views

Join the DZone community and get the full member experience.

Join For Free

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, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • 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
  • Apache Ranger and AWS EMR Automated Installation and Integration Series (3): Windows AD + EMR-Native Ranger

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: