EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB486395: How to execute Command Manager scripts without exposing User Credentials in the Command Line Interface on Windows


Michiel Dietvorst

Senior Support Engineer • MicroStrategy


This article outlines a method that can be used to execute Command Manager scripts through the command line interface, using Command Manager in the "Interactive" mode, without exposing any user credentials to the command line history.

Introduction

When executing commands and scripts through the command line, user credentials are recorded in the command line history, posing a security risk if the history is not cleared. One method to safeguard user credentials is to utilize Command Manager in the "Interactive Mode".
Command Manager Interactive Mode provides a text-based interface with two distinct modes:

  • Console Mode: Enables connection to a project source, script loading, and environment setting modifications.
  • Edit Mode: Allows the creation, editing, and execution of scripts.

Upon initiating the Interactive session of Command Manager, it enters Console Mode with a connection-less session. When executing the connect command to the Strategy Project Source, omit the password (-p) parameter. This prompts the Command Manager Interactive Mode to request a password, which remains concealed, and is not recorded in the command line history.
 

Steps

  1. Open a Command Prompt session as an Administrator.
  2. Navigate to the installation location of Command Manager in Command Prompt using the cd command. The default installation directory of Command Manager is "C:\Program Files (x86)\MicroStrategy\Command Manager". For example:
    
    cd C:\Program Files (x86)\MicroStrategy\Command Manager

  3. Start Command Manager in the Interactive Mode using the command:
    
    cmdmgr.exe -interactive

  4. Establish a connection to the Strategy Project Source with the command:
    
    connectmstr -n "<Project Source Name>" -u "<User Name>"

     For example: 
    
    connectmstr -n "Strategy Analytics Modules" -u "Administrator"

  5. To load a script, use the command: 
    
    LOADFILE <file path>

     ​​For example: 
    
    LOADFILE C:\Users\admin\Desktop\LIST_ALL_USER_CONNECTIONS.scp

  6. Once the script file has loaded, to execute it, use the command: EXEC 
  7. Verify the Command Prompt history by pressing "F7" and observe that the password is not visible in the command line history, as shown in the image below:
ka0PW0000000uv3YAA_0EMPW000004ywek.jpeg

 


Comment

0 comments

Details

Knowledge Article

Published:

March 25, 2024

Last Updated:

March 25, 2024