1Strive
01-04-2008, 08:12 PM
Hi everyone,
1STRIVE here.
I am not a programmer. I hardly ever have to write my own scripts. Batch files is about the extent of what I do. I am a windows system admin.
I have a batch file to add shares to a cluster and I want to get it to use parameters and then pull the answers from a txt or csv file. Or I want input boxes to pop up for the answers.
Here is what I have.
cluster resource "MGMT1$" /create /group:"Group 00" /Type:"File Share"
cluster resource "MGMT1$" /priv Security=Everyone,set,R:security
cluster resource "MGMT1$" /priv Security=Administrators,set,F:security
cluster resource "MGMT1$" /adddep:"Disk V:"
cluster resource "MGMT1$" /priv ShareName=MGMT1$
cluster resource "MGMT1$" /priv Path="V:\MGMT1"
cluster resource "MGMT1$" /priv Remark=Fuji
cluster resource "MGMT1$" /on
This works like a champ, but I need to repeat it 50 times with different "Share Names, Disk, and Path"
The next one would look like this.
cluster resource "ATHMT1$" /create /group:"Group 00" /Type:"File Share"
cluster resource "ATHMT1$" /priv Security=Everyone,set,R:security
cluster resource "ATHMT1$" /priv Security=Administrators,set,F:security
cluster resource "ATHMT1$" /adddep:"Disk T:"
cluster resource "ATHMT1$" /priv ShareName=ATHMT1$
cluster resource "ATHMT1$" /priv Path="T:\ATHMT1"
cluster resource "ATHMT1$" /priv Remark=Fuji
cluster resource "ATHMT1$" /on
So, any help will be appreciated. Thanks,
1STRIVE
1STRIVE here.
I am not a programmer. I hardly ever have to write my own scripts. Batch files is about the extent of what I do. I am a windows system admin.
I have a batch file to add shares to a cluster and I want to get it to use parameters and then pull the answers from a txt or csv file. Or I want input boxes to pop up for the answers.
Here is what I have.
cluster resource "MGMT1$" /create /group:"Group 00" /Type:"File Share"
cluster resource "MGMT1$" /priv Security=Everyone,set,R:security
cluster resource "MGMT1$" /priv Security=Administrators,set,F:security
cluster resource "MGMT1$" /adddep:"Disk V:"
cluster resource "MGMT1$" /priv ShareName=MGMT1$
cluster resource "MGMT1$" /priv Path="V:\MGMT1"
cluster resource "MGMT1$" /priv Remark=Fuji
cluster resource "MGMT1$" /on
This works like a champ, but I need to repeat it 50 times with different "Share Names, Disk, and Path"
The next one would look like this.
cluster resource "ATHMT1$" /create /group:"Group 00" /Type:"File Share"
cluster resource "ATHMT1$" /priv Security=Everyone,set,R:security
cluster resource "ATHMT1$" /priv Security=Administrators,set,F:security
cluster resource "ATHMT1$" /adddep:"Disk T:"
cluster resource "ATHMT1$" /priv ShareName=ATHMT1$
cluster resource "ATHMT1$" /priv Path="T:\ATHMT1"
cluster resource "ATHMT1$" /priv Remark=Fuji
cluster resource "ATHMT1$" /on
So, any help will be appreciated. Thanks,
1STRIVE