ADSM-L

Re: [ADSM-L] Script question

2015-09-08 08:52:05
Subject: Re: [ADSM-L] Script question
From: "Meunier, Yann" <yann.meunier AT CAISSEDESDEPOTS DOT FR>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 8 Sep 2015 12:50:30 +0000
Hi Robert,

This is an example with Powershell :

$a = read-host "what is your name?"
"hello $a"

For secure (password ..) you can add this parameter : -AsSecureString

$pass = Read-Host 'What is your password?' -AsSecureString

Best Regards,

Yann MEUNIER
Ingénierie - Système Stockage
Informatique CDC - Etablissement DPI
Office : +33 1 58 50 53 01
Mobile : +33 6 62 47 88 56



-----Message d'origine-----
De : ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] De la part de 
Robert Ouzen
Envoyé : mardi 8 septembre 2015 14:04
À : ADSM-L AT VM.MARIST DOT EDU
Objet : Re: [ADSM-L] Script question

Sorry I did not mention the operating system ... for Windows 2008 R2 TSM server

Regards

Robert

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Rhodes, Richard L.
Sent: Tuesday, September 08, 2015 2:06 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] Script question

You didn't indicate which operating system.
Here is a AIX/KSH script to prompt for and change a node password.

#!/usr/bin/ksh

print ""
print "Dialog to change a NODE password."
print ""
print "Please enter a node name, or partial node name.  I'll do a lookup on it 
for you!"
read Inode
print ""
print "You entered $Inode , performing lookukp . . . "
/tsmdata/tsm_scripts/q_node.ksh $Inode
print ""
print "There, it should be one of the above. "
print "Please enter the FULL NODE NAME from above."
Inode=""
read Inode
print ""
print "The node we are going to change is $Inode"
print ""
print "Please enter the TSM instance of the node."
read Itsm
print ""
print "The node is in  $Itsm"
print ""
print "Please enter the new password."
read Ipwd
print ""
print "TODO: chg pwd for  node= $Inode  tsm= $Itsm  newpwd= $Ipwd"
print "type \"ok\" to proceed"
read Iok
if [[ $Iok == 'ok' ]]; then
    print ""
    print "performing change . . . "
    /tsmdata/tsm_scripts/run_cmd.ksh $Itsm "update node $Inode $Ipwd"
    print ""
    print "all done!!!!"
else
    print ""
    print "terminating"
fi




-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Robert Ouzen
Sent: Monday, September 07, 2015 9:48 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Script question

Hi to all

Anybody have an example for during a script , asking for a parameter. Waiting 
for the input and after pass the parameter to a command

For example something like this:

"Please enter the process number   $1 "
Waiting ...........
can pr   $1

Best Regards

Robert


-----------------------------------------

The information contained in this message is intended only for the personal and 
confidential use of the recipient(s) named above. If the reader of this message 
is not the intended recipient or an agent responsible for delivering it to the 
intended recipient, you are hereby notified that you have received this 
document in error and that any review, dissemination, distribution, or copying 
of this message is strictly prohibited. If you have received this communication 
in error, please notify us immediately, and delete the original message.
Ce message et toutes les pièces jointes (ci-après le « message ») sont 
confidentiels et établis à l’intention exclusive de ses destinataires. Toute 
utilisation de ce message non conforme à sa destination, toute diffusion ou 
toute publication, totale ou partielle, est interdite, sauf autorisation 
expresse. Si vous recevez ce message par erreur, merci de le détruire sans en 
conserver de copie et d’en avertir immédiatement l’expéditeur. Internet ne 
permettant pas de garantir l’intégrité de ce message, la Caisse des Dépôts et 
Consignations décline toute responsabilité au titre de ce message s’il a été 
modifié, altéré, déformé ou falsifié. Par ailleurs et malgré toutes les 
précautions prises pour éviter la présence de virus dans nos envois, nous vous 
recommandons de prendre, de votre côté, les mesures permettant d'assurer la 
non-introduction de virus dans votre système informatique.

This email message and any attachments (“the email”) are confidential and 
intended only for the recipient(s) indicated. If you are not an intented 
recipient, please be advised that any use, dissemination, forwarding or copying 
of this email whatsoever is prohibited without Caisse des Depots et 
Consignations's prior written consent. If you have received this email in 
error, please delete it without saving a copy and notify the sender 
immediately. Internet emails are not necessarily secured, and declines 
responsibility for any changes that may have been made to this email after it 
was sent. While we take all reasonable precautions to ensure that viruses are 
not transmitted via emails, we recommend that you take your own measures to 
prevent viruses from entering your computer system.

<Prev in Thread] Current Thread [Next in Thread>