RE: Powershell and dos batch

2012-06-13 Thread itli...@imcu.com
Thanks for the cattleprod.  I needed it today.

 

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 2:54 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

The error message you provided in your last message was from the
powershell script. So your batch is executing the script, but the script
is borked.

That's why my last post said to try changing your script. J

 

With something like this I find it best to break it down into steps:

First make sure your powershell script works.

Second, make sure your batch can execute a simple powershell script (a
one-liner with write-host is good)

Combine and serve.

 

DAMIEN SOLODOW

Systems Engineer

317.447.6033 (office)

317.447.6014 (fax)

HARRISON COLLEGE

 

From: itli...@imcu.com [mailto:itli...@imcu.com] 
Sent: Wednesday, June 06, 2012 2:15 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

 

Killing me man.  Killing me.

I open a dos window

I change directory to the powershell directory

I execute powershell -file "myfile.ps1"

I get nothing.

Top it off I am trying to execute some BackupExec powershell commands in
myfile.ps1 and I am not sure they want to play nice either.

Really just an example of a powershell being executed within DOS is all
I need to get this going.

 

 

From: Andrew S. Baker [mailto:asbz...@gmail.com] 
Posted At: Wednesday, June 06, 2012 1:45 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: Re: Powershell and dos batch

 

Who says it isn't simple?  (And why do you think it should be more
simple than it already is?)


ASB

http://XeeMe.com/AndrewBaker

Harnessing the Advantages of Technology for the SMB market...

 

On Wed, Jun 6, 2012 at 1:19 PM, itli...@imcu.com 
wrote:

Really struggling with this.  It should be so simple.

 

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Re: Powershell and dos batch

2012-06-07 Thread Steven Peck
If you want to hear an interesting inteview regarding PowerShell v3, what
got fixed, what didn't and some of the why certain things are different
then here's the discussion with Jeffrey Snover.  I heard interviews with
him before and he's pretty funny as well as fairly straight forward about
what got fixed and why certain descians were made.

http://powerscripting.wordpress.com/2012/05/21/episode-186-the-scripting-games-winners-with-jeffrey-snover-and-ed-wilson/


Also, for those on this list starting out with PowerShell, bookmark this
link:
http://social.technet.microsoft.com/wiki/contents/articles/183.windows-powershell-survival-guide-en-us.aspx
It's well maintained.

Steven Peck
http://www.blkmtn.org



On Wed, Jun 6, 2012 at 5:23 PM, Damien Solodow
wrote:

>  That’s what I was afraid of. I hope that Exchange won’t require a new
> version or SP to support 3.0 as I’d hate to have my management tools broken.
> 
>
> ** **
>
> DAMIEN SOLODOW
>
> Systems Engineer
>
> 317.447.6033 (office)
>
> 317.447.6014 (fax)
>
> HARRISON COLLEGE
>
> ** **
>
> *From:* Michael B. Smith [mailto:mich...@smithcons.com]
> *Sent:* Wednesday, June 06, 2012 8:17 PM
>
> *To:* NT System Admin Issues
> *Subject:* RE: Powershell and dos batch
>
>  ** **
>
> Pretty much everything will require updates.
>
> ** **
>
> *From:* Damien Solodow [mailto:damien.solo...@harrison.edu]
> *Sent:* Wednesday, June 06, 2012 7:45 PM
> *To:* NT System Admin Issues
> *Subject:* RE: Powershell and dos batch
>
> ** **
>
> Who reads those? ;)
>
> And yeah, I did read through the ones for the most recent 3.0 RC. I did
> like the number of “this will now throw an error because it should have
> before”
>
> ** **
>
> On a related note, any idea how existing modules like Exchange 2010 and
> the MS AD module will work with 3.0? I’ll wager the Citrix and VMware ones
> will need updates, and I know there is a workaround required with
> SharePoint 2010…
>
> ** **
>
> DAMIEN SOLODOW
>
> Systems Engineer
>
> 317.447.6033 (office)
>
> 317.447.6014 (fax)
>
> HARRISON COLLEGE
>
> ** **
>
> *From:* Michael B. Smith [mailto:mich...@smithcons.com]
> *Sent:* Wednesday, June 06, 2012 6:44 PM
> *To:* NT System Admin Issues
> *Subject:* RE: Powershell and dos batch
>
> ** **
>
> OH NO THEY AREN’T fully backward compatible.  Read your release notes.
>
> ** **
>
> *From:* Damien Solodow [mailto:damien.solo...@harrison.edu]
> *Sent:* Wednesday, June 06, 2012 5:41 PM
> *To:* NT System Admin Issues
> *Subject:* RE: Powershell and dos batch
>
> ** **
>
> I blame MBS. ;)
>
> ** **
>
> I think it’s because the newer versions are fully backward compatible so
> there is no reason for parallel installs. So by putting it in the same
> directory scripts and the like invoking powershell aren’t broken by new
> versions.
>
> ** **
>
> DAMIEN SOLODOW****
>
> Systems Engineer
>
> 317.447.6033 (office)
>
> 317.447.6014 (fax)
>
> HARRISON COLLEGE
>
> ** **
>
> *From:* Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
> *Sent:* Wednesday, June 06, 2012 4:49 PM
> *To:* NT System Admin Issues
> *Subject:* RE: Powershell and dos batch
>
> ** **
>
> Ah, did not know that!  I wonder who thought up that gem?  =)
>
> ** **
>
> *From:* Damien Solodow [mailto:damien.solo...@harrison.edu]
> *Sent:* Wednesday, June 06, 2012 12:47 PM
> *To:* NT System Admin Issues
> *Subject:* Re: Powershell and dos batch
>
> ** **
>
> Actually all current powershell versions (including the forthcoming 3.0)
> install in that path.
> --
> Sent using BlackBerry
>
>  
>
> *From*: Miller Bonnie L. 
> [mailto:mille...@mukilteo.wednet.edu]
>
> *Sent*: Wednesday, June 06, 2012 02:47 PM
> *To*: NT System Admin Issues 
> *Subject*: RE: Powershell and dos batch
>  
>
> Do they require Powershell v2?  I see you are using v1.0.
>
> ** **
>
> *From:* itli...@imcu.com [mailto:itli...@imcu.com ]
> *Sent:* Wednesday, June 06, 2012 10:36 AM
> *To:* NT System Admin Issues
> *Subject:* RE: Powershell and dos batch
>
> ** **
>
> I did what you said.
>
> Here is my error so far.
>
> The term 'GET-BEJob' is not recognized as the name of a cmdlet, function,
> scri
>
> t file, or operable program. Check the spelling of the name, or if a path
> was
>
> ncluded, verify that the path is correct and try again.
>
> At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob

RE: Powershell and dos batch

2012-06-06 Thread Brian Desmond
You can pass session level execution policy by adding a -ExecutionPolicy 
argument to your powershell.exe call.

Thanks,
Brian Desmond
br...@briandesmond.com

w - 312.625.1438 | c   - 312.731.3132

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com]
Sent: Wednesday, June 06, 2012 9:49 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
>session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
I agree with that entirely.  I know nothing of powershell but require a
dos batch backup of the server.  So I learn bits from you all.  And
thank you again.

-Original Message-
From: Michael B. Smith [mailto:mich...@smithcons.com] 
Posted At: Wednesday, June 06, 2012 5:50 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

PowerShell was designed to address 3 major classes of people:

Admins,
Admin scripters,
Developers.

There is feature content for each group and a fairly decent glide path
between the groups.

Truth be told though, if you don't have mastery of "basic admin" use of
PowerShell before you try to become an "admin scripter" - then you are
going to have problems.

This entire thread is just an illustration of that.

-Original Message-
From: Ben Scott [mailto:mailvor...@gmail.com]
Sent: Wednesday, June 06, 2012 1:52 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

On Wed, Jun 6, 2012 at 1:19 PM, itli...@imcu.com 
wrote:
> Really struggling with this.

  Perhaps buy a book on PowerShell.

> It should be so simple.

  IT is rarely as simple as it "should" be.

-- Ben

~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~
<http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~
<http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin



RE: Powershell and dos batch

2012-06-06 Thread Damien Solodow
That’s what I was afraid of. I hope that Exchange won’t require a new version 
or SP to support 3.0 as I’d hate to have my management tools broken.

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Michael B. Smith [mailto:mich...@smithcons.com]
Sent: Wednesday, June 06, 2012 8:17 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Pretty much everything will require updates.

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 7:45 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Who reads those? ;)
And yeah, I did read through the ones for the most recent 3.0 RC. I did like 
the number of “this will now throw an error because it should have before”

On a related note, any idea how existing modules like Exchange 2010 and the MS 
AD module will work with 3.0? I’ll wager the Citrix and VMware ones will need 
updates, and I know there is a workaround required with SharePoint 2010…

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Michael B. Smith 
[mailto:mich...@smithcons.com]<mailto:[mailto:mich...@smithcons.com]>
Sent: Wednesday, June 06, 2012 6:44 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

OH NO THEY AREN’T fully backward compatible.  Read your release notes.

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 5:41 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I blame MBS. ;)

I think it’s because the newer versions are fully backward compatible so there 
is no reason for parallel installs. So by putting it in the same directory 
scripts and the like invoking powershell aren’t broken by new versions.

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Miller Bonnie L. 
[mailto:mille...@mukilteo.wednet.edu]<mailto:[mailto:mille...@mukilteo.wednet.edu]>
Sent: Wednesday, June 06, 2012 4:49 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Ah, did not know that!  I wonder who thought up that gem?  =)

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.
--
Sent using BlackBerry


From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 02:47 PM
To: NT System Admin Issues 
mailto:ntsysadmin@lyris.sunbelt-software.com>>
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com<mailto:itli...@imcu.com> [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exe

RE: Powershell and dos batch

2012-06-06 Thread Michael B. Smith
Pretty much everything will require updates.

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Sent: Wednesday, June 06, 2012 7:45 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Who reads those? ;)
And yeah, I did read through the ones for the most recent 3.0 RC. I did like 
the number of “this will now throw an error because it should have before”

On a related note, any idea how existing modules like Exchange 2010 and the MS 
AD module will work with 3.0? I’ll wager the Citrix and VMware ones will need 
updates, and I know there is a workaround required with SharePoint 2010…

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Michael B. Smith 
[mailto:mich...@smithcons.com]<mailto:[mailto:mich...@smithcons.com]>
Sent: Wednesday, June 06, 2012 6:44 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

OH NO THEY AREN’T fully backward compatible.  Read your release notes.

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 5:41 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I blame MBS. ;)

I think it’s because the newer versions are fully backward compatible so there 
is no reason for parallel installs. So by putting it in the same directory 
scripts and the like invoking powershell aren’t broken by new versions.

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Miller Bonnie L. 
[mailto:mille...@mukilteo.wednet.edu]<mailto:[mailto:mille...@mukilteo.wednet.edu]>
Sent: Wednesday, June 06, 2012 4:49 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Ah, did not know that!  I wonder who thought up that gem?  =)

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.
--
Sent using BlackBerry


From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 02:47 PM
To: NT System Admin Issues 
mailto:ntsysadmin@lyris.sunbelt-software.com>>
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com<mailto:itli...@imcu.com> [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a p

RE: Powershell and dos batch

2012-06-06 Thread Damien Solodow
Who reads those? ;)
And yeah, I did read through the ones for the most recent 3.0 RC. I did like 
the number of “this will now throw an error because it should have before”

On a related note, any idea how existing modules like Exchange 2010 and the MS 
AD module will work with 3.0? I’ll wager the Citrix and VMware ones will need 
updates, and I know there is a workaround required with SharePoint 2010…

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Michael B. Smith [mailto:mich...@smithcons.com]
Sent: Wednesday, June 06, 2012 6:44 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

OH NO THEY AREN’T fully backward compatible.  Read your release notes.

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 5:41 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I blame MBS. ;)

I think it’s because the newer versions are fully backward compatible so there 
is no reason for parallel installs. So by putting it in the same directory 
scripts and the like invoking powershell aren’t broken by new versions.

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Miller Bonnie L. 
[mailto:mille...@mukilteo.wednet.edu]<mailto:[mailto:mille...@mukilteo.wednet.edu]>
Sent: Wednesday, June 06, 2012 4:49 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Ah, did not know that!  I wonder who thought up that gem?  =)

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.
--
Sent using BlackBerry


From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 02:47 PM
To: NT System Admin Issues 
mailto:ntsysadmin@lyris.sunbelt-software.com>>
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com<mailto:itli...@imcu.com> [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To mana

RE: Powershell and dos batch

2012-06-06 Thread Michael B. Smith
OH NO THEY AREN’T fully backward compatible.  Read your release notes.

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Sent: Wednesday, June 06, 2012 5:41 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I blame MBS. ;)

I think it’s because the newer versions are fully backward compatible so there 
is no reason for parallel installs. So by putting it in the same directory 
scripts and the like invoking powershell aren’t broken by new versions.

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Miller Bonnie L. 
[mailto:mille...@mukilteo.wednet.edu]<mailto:[mailto:mille...@mukilteo.wednet.edu]>
Sent: Wednesday, June 06, 2012 4:49 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Ah, did not know that!  I wonder who thought up that gem?  =)

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.
--
Sent using BlackBerry


From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 02:47 PM
To: NT System Admin Issues 
mailto:ntsysadmin@lyris.sunbelt-software.com>>
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com<mailto:itli...@imcu.com> [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltso

RE: Powershell and dos batch

2012-06-06 Thread Joseph L. Casale
Language Engine version and Windows Powershell version are two different things.
Its all Language Engine version "1" for all three Windows Powershell versions.

From: Miller Bonnie L. [mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 2:49 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Ah, did not know that!  I wonder who thought up that gem?  =)

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread Michael B. Smith
PowerShell was designed to address 3 major classes of people:

Admins,
Admin scripters,
Developers.

There is feature content for each group and a fairly decent glide path between 
the groups.

Truth be told though, if you don't have mastery of "basic admin" use of 
PowerShell before you try to become an "admin scripter" - then you are going to 
have problems.

This entire thread is just an illustration of that.

-Original Message-
From: Ben Scott [mailto:mailvor...@gmail.com] 
Sent: Wednesday, June 06, 2012 1:52 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

On Wed, Jun 6, 2012 at 1:19 PM, itli...@imcu.com  wrote:
> Really struggling with this.

  Perhaps buy a book on PowerShell.

> It should be so simple.

  IT is rarely as simple as it "should" be.

-- Ben

~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ 
<http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin



RE: Powershell and dos batch

2012-06-06 Thread Michael B. Smith
It is SUPPOSED to indicate compatibility between the versions.

Which, for everything but the simplest of scripts, is beginning to be something 
of a joke, especially with PS 3.0.

From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 4:49 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Ah, did not know that!  I wonder who thought up that gem?  =)

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.
--
Sent using BlackBerry


From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 02:47 PM
To: NT System Admin Issues 
mailto:ntsysadmin@lyris.sunbelt-software.com>>
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com<mailto:itli...@imcu.com> [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage sub

RE: Powershell and dos batch

2012-06-06 Thread Damien Solodow
I blame MBS. ;)

I think it’s because the newer versions are fully backward compatible so there 
is no reason for parallel installs. So by putting it in the same directory 
scripts and the like invoking powershell aren’t broken by new versions.

DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE

From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 4:49 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Ah, did not know that!  I wonder who thought up that gem?  =)

From: Damien Solodow 
[mailto:damien.solo...@harrison.edu]<mailto:[mailto:damien.solo...@harrison.edu]>
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.
--
Sent using BlackBerry


From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 02:47 PM
To: NT System Admin Issues 
mailto:ntsysadmin@lyris.sunbelt-software.com>>
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com<mailto:itli...@imcu.com> [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Fin

RE: Powershell and dos batch

2012-06-06 Thread Michael B. Smith
I recommend, quite strongly, that you buy yourself a book. A beginner's book 
such as "PowerShell In A Month of Lunches".

In Win8/Server 2012 everything is PowerShell. The GUI's have far few 
capabilities than the command line, and you can be certain that that is the 
future.

If you haven't learned PowerShell yet - you are already behind the curve.

From: itli...@imcu.com [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 3:49 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Working under v1.0.


From: Miller Bonnie L. 
[mailto:mille...@mukilteo.wednet.edu]<mailto:[mailto:mille...@mukilteo.wednet.edu]>
Posted At: Wednesday, June 06, 2012 2:48 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com<mailto:itli...@imcu.com> 
[mailto:itli...@imcu.com]<mailto:[mailto:itli...@imcu.com]>
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping...

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
>session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or s

RE: Powershell and dos batch

2012-06-06 Thread Miller Bonnie L .
Ah, did not know that!  I wonder who thought up that gem?  =)

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: Re: Powershell and dos batch

Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.
--
Sent using BlackBerry


From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 02:47 PM
To: NT System Admin Issues 
mailto:ntsysadmin@lyris.sunbelt-software.com>>
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com<mailto:itli...@imcu.com> [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscri

RE: Powershell and dos batch

2012-06-06 Thread Christopher Bodnar
Did you take a look at any of the documentation on the Symantec site? 
According to this it requires PowerShell 2.0:

http://www.symantec.com/connect/articles/preparing-your-powershell-environment-run-bemcli-and-scripts





Christopher Bodnar 
Enterprise Achitect I, Corporate Office of Technology:Enterprise 
Architecture and Engineering Services 
Tel 610-807-6459 
3900 Burgess Place, Bethlehem, PA 18017 
christopher_bod...@glic.com 




The Guardian Life Insurance Company of America

www.guardianlife.com 







From:   "itli...@imcu.com" 
To: "NT System Admin Issues" 
Date:   06/06/2012 03:51 PM
Subject:        RE: Powershell and dos batch



How do I push the confirm to Y?
 
 
 
From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 2:06 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch
 
Ah. Change your .ps1 file;
Import-module bemcli
Get-BEJob -Name "BackupJob-Full" | Start-BEJob
 
DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE
 
From: itli...@imcu.com [mailto:itli...@imcu.com] 
Sent: Wednesday, June 06, 2012 1:36 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
 
I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, 
scri
t file, or operable program. Check the spelling of the name, or if a path 
was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], 
CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
 
From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch
 
Did you run the set-executionpolicy like I mentioned? 
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…
 
From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch
 
From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply. 
 
jlc

From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a 
DOS batch file.
Here is what I have so far:
 
::Batch File
::powershell
 
C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | 
exit
 
 
Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks
 
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscript

Re: Powershell and dos batch

2012-06-06 Thread Damien Solodow
Add -confirm:0 as a parameter to start-bejob
--Original Message--
From: itli...@imcu.com
To: NT System Admin Issues
ReplyTo: NT System Admin Issues
Subject: RE: Powershell and dos batch
Sent: Jun 6, 2012 2:53 PM

How do I push the confirm to Y?
 
 
 
From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 2:06 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch
 
Ah. Change your .ps1 file;
Import-module bemcli
Get-BEJob -Name "BackupJob-Full" | Start-BEJob
 
DAMIEN SOLODOW
Systems Engineer
317.447.6033 (office)
317.447.6014 (fax)
HARRISON COLLEGE
 
From: itli...@imcu.com [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:36 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
 
I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
    + CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch
 
Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?
From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 
--
Sent using BlackBerry

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin



RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
Working under v1.0.

 

 

From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu] 
Posted At: Wednesday, June 06, 2012 2:48 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Do they require Powershell v2?  I see you are using v1.0.

 

From: itli...@imcu.com [mailto:itli...@imcu.com] 
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

 

I did what you said.

Here is my error so far.

The term 'GET-BEJob' is not recognized as the name of a cmdlet,
function, scri

t file, or operable program. Check the spelling of the name, or if a
path was

ncluded, verify that the path is correct and try again.

At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33

+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob

+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [],
CommandNo

   tFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Did you run the set-executionpolicy like I mentioned? 

If so, what is the exact error you are receiving when running the batch?



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Not helping...

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread Joseph L. Casale
How did you determine that?

From: Miller Bonnie L. [mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 12:47 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Re: Powershell and dos batch

2012-06-06 Thread Damien Solodow
Actually all current powershell versions (including the forthcoming 3.0) 
install in that path.
--
Sent using BlackBerry


From: Miller Bonnie L. [mailto:mille...@mukilteo.wednet.edu]
Sent: Wednesday, June 06, 2012 02:47 PM
To: NT System Admin Issues 
Subject: RE: Powershell and dos batch

Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping…

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoft

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
Ok

Thanks to all.

Here is what I have.

Dos Batch File executed by a Scheduler software.

:Powershell

C:\Windows\System32\WindowsPowerShell\V1.0\PowerShell.exe -file
c:\windows\system32\windowspowershell\v1.0\Backupjob.ps1

Exit

 

A powershell script.

BackupJob:

Import-module bemcli

Get-BEJob -Name "Test-Full" | 

Start-BEJob -Confirm:$False |

Out-Null

 

Everything is running nicely.

 

Thanks again.

 

 

 

From: Webster [mailto:webs...@carlwebster.com] 
Posted At: Wednesday, June 06, 2012 2:26 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

If you do import-module BEMCLI from a PowerShell prompt, what happens?

 

 

Carl Webster

Consultant and Citrix Technology Professional

http://www.CarlWebster.com <http://www.carlwebster.com/> 

 

From: itli...@imcu.com [mailto:itli...@imcu.com] 
Sent: Wednesday, June 06, 2012 12:36 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

 

I did what you said.

Here is my error so far.

The term 'GET-BEJob' is not recognized as the name of a cmdlet,
function, scri

t file, or operable program. Check the spelling of the name, or if a
path was

ncluded, verify that the path is correct and try again.

At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33

+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob

+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [],
CommandNo

   tFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Did you run the set-executionpolicy like I mentioned? 

If so, what is the exact error you are receiving when running the batch?



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Not helping...

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Fin

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
Getting there.  Just need to figure the confirm issue the Start-BEJob
and I am set.

 

 

From: Webster [mailto:webs...@carlwebster.com] 
Posted At: Wednesday, June 06, 2012 2:26 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

If you do import-module BEMCLI from a PowerShell prompt, what happens?

 

 

Carl Webster

Consultant and Citrix Technology Professional

http://www.CarlWebster.com <http://www.carlwebster.com/> 

 

From: itli...@imcu.com [mailto:itli...@imcu.com] 
Sent: Wednesday, June 06, 2012 12:36 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

 

I did what you said.

Here is my error so far.

The term 'GET-BEJob' is not recognized as the name of a cmdlet,
function, scri

t file, or operable program. Check the spelling of the name, or if a
path was

ncluded, verify that the path is correct and try again.

At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33

+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob

+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [],
CommandNo

   tFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Did you run the set-executionpolicy like I mentioned? 

If so, what is the exact error you are receiving when running the batch?



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Not helping...

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerfu

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
Now it is.  Just need to get past this Confirm piece of Start-BEJob and
I will be cooking in grease I think.

 

 

From: Kennedy, Jim [mailto:kennedy...@elyriaschools.org] 
Posted At: Wednesday, June 06, 2012 2:24 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Does the powershell script run correctly if you invoke it manually?

 

From: itli...@imcu.com [mailto:itli...@imcu.com] 
Sent: Wednesday, June 06, 2012 2:01 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

 

I did what you said.

Here is my error so far.

The term 'GET-BEJob' is not recognized as the name of a cmdlet,
function, scri

t file, or operable program. Check the spelling of the name, or if a
path was

ncluded, verify that the path is correct and try again.

At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33

+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob

+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [],
CommandNo

   tFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Did you run the set-executionpolicy like I mentioned? 

If so, what is the exact error you are receiving when running the batch?



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Not helping...

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Busines

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
How do I push the confirm to Y?

 

 

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 2:06 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Ah. Change your .ps1 file;

Import-module bemcli

Get-BEJob -Name "BackupJob-Full" | Start-BEJob

 

DAMIEN SOLODOW

Systems Engineer

317.447.6033 (office)

317.447.6014 (fax)

HARRISON COLLEGE

 

From: itli...@imcu.com [mailto:itli...@imcu.com] 
Sent: Wednesday, June 06, 2012 1:36 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

 

I did what you said.

Here is my error so far.

The term 'GET-BEJob' is not recognized as the name of a cmdlet,
function, scri

t file, or operable program. Check the spelling of the name, or if a
path was

ncluded, verify that the path is correct and try again.

At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33

+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob

+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [],
CommandNo

   tFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Did you run the set-executionpolicy like I mentioned? 

If so, what is the exact error you are receiving when running the batch?



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Not helping...

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN&#

RE: Powershell and dos batch

2012-06-06 Thread Miller Bonnie L .
Do they require Powershell v2?  I see you are using v1.0.

From: itli...@imcu.com [mailto:itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:36 AM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

I did what you said.
Here is my error so far.
The term 'GET-BEJob' is not recognized as the name of a cmdlet, function, scri
t file, or operable program. Check the spelling of the name, or if a path was
ncluded, verify that the path is correct and try again.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33
+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob
+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [], CommandNo
   tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

From: Damien Solodow [mailto:damien.solo...@harrison.edu]
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch
Not helping...

From: Joseph L. Casale 
[mailto:jcas...@activenetwerx.com]<mailto:[mailto:jcas...@activenetwerx.com]>
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com<mailto:itli...@imcu.com>
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
>session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
Killing me man.  Killing me.

I open a dos window

I change directory to the powershell directory

I execute powershell -file "myfile.ps1"

I get nothing.

Top it off I am trying to execute some BackupExec powershell commands in
myfile.ps1 and I am not sure they want to play nice either.

Really just an example of a powershell being executed within DOS is all
I need to get this going.

 

 

From: Andrew S. Baker [mailto:asbz...@gmail.com] 
Posted At: Wednesday, June 06, 2012 1:45 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: Re: Powershell and dos batch

 

Who says it isn't simple?  (And why do you think it should be more
simple than it already is?)


ASB

http://XeeMe.com/AndrewBaker

Harnessing the Advantages of Technology for the SMB market...





On Wed, Jun 6, 2012 at 1:19 PM, itli...@imcu.com 
wrote:

Really struggling with this.  It should be so simple.

 

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Re: Powershell and dos batch

2012-06-06 Thread Ben Scott
On Wed, Jun 6, 2012 at 1:19 PM, itli...@imcu.com  wrote:
> Really struggling with this.

  Perhaps buy a book on PowerShell.

> It should be so simple.

  IT is rarely as simple as it "should" be.

-- Ben

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~   ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


Re: Powershell and dos batch

2012-06-06 Thread Andrew S. Baker
Who says it isn't simple?  (And why do you think it should be more simple
than it already is?)

* *

*ASB* *http://XeeMe.com/AndrewBaker* *Harnessing the Advantages of
Technology for the SMB market…

*



On Wed, Jun 6, 2012 at 1:19 PM, itli...@imcu.com  wrote:

> Really struggling with this.  It should be so simple.
>
> ** **
>
> ** **
>
> *From:* Joseph L. Casale [mailto:jcas...@activenetwerx.com]
> *Posted At:* Wednesday, June 06, 2012 12:49 PM
> *Posted To:* itli...@imcu.com
> *Conversation:* Powershell and dos batch
> *Subject:* RE: Powershell and dos batch
>
> ** **
>
> From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a
> session with a script and all the other options which may need to apply. *
> ***
>
> ** **
>
> jlc
> --
>
> *From:* itli...@imcu.com [itli...@imcu.com]
> *Sent:* Wednesday, June 06, 2012 10:07 AM
> *To:* NT System Admin Issues
> *Subject:* Powershell and dos batch
>
> I have need to running a powershell script for Backup Exec 2012 through a
> DOS batch file.
>
> Here is what I have so far:
>
>  
>
> ::Batch File
>
> ::powershell
>
>  
>
> C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
> "'e:\in01\oper\task\BackupJob.ps1'"
>
> exit
>
> ___
>
> BackupJob.ps1
>
> Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
> exit
>
>  
>
>  
>
> Where the BackupJob is already set up in the GUI library on the server.***
> *
>
> I get nothing.
>
> The batch file just finishes.
>
> I put a pause after it and I see no errors?
>
> So what am I doing wrong and how do I make it work?
>
> Thanks
>
>  
>
>
>

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
I did what you said.

Here is my error so far.

The term 'GET-BEJob' is not recognized as the name of a cmdlet,
function, scri

t file, or operable program. Check the spelling of the name, or if a
path was

ncluded, verify that the path is correct and try again.

At C:\WINDOWS\system32\WindowsPowerShell\v1.0\BackupJob.ps1:1 char:33

+ Import-module BEMCLI | GET-BEJob <<<<  "Test-Full" | START-BEJob

+ CategoryInfo  : ObjectNotFound: (GET-BEJob:String) [],
CommandNo

   tFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 1:18 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Did you run the set-executionpolicy like I mentioned? 

If so, what is the exact error you are receiving when running the batch?



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Not helping...

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
Really struggling with this.  It should be so simple.

 

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread Damien Solodow
Did you run the set-executionpolicy like I mentioned?
If so, what is the exact error you are receiving when running the batch?

From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 1:00 PM
To: NT System Admin Issues
Subject: RE: Powershell and dos batch

Not helping…

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com]
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
>session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com<mailto:itli...@imcu.com> [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch
I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:

::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
Not helping...

 

From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] 
Posted At: Wednesday, June 06, 2012 12:49 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke
a session with a script and all the other options which may need to
apply. 

 

jlc



From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread Joseph L. Casale
>From a DOS shell, type `powershell.exe -?` and you'll see how to invoke a 
>session with a script and all the other options which may need to apply.

jlc

From: itli...@imcu.com [itli...@imcu.com]
Sent: Wednesday, June 06, 2012 10:07 AM
To: NT System Admin Issues
Subject: Powershell and dos batch

I have need to running a powershell script for Backup Exec 2012 through a DOS 
batch file.
Here is what I have so far:


::Batch File
::powershell

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe 
"'e:\in01\oper\task\BackupJob.ps1'"
exit
___
BackupJob.ps1
Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob | exit


Where the BackupJob is already set up in the GUI library on the server.
I get nothing.
The batch file just finishes.
I put a pause after it and I see no errors?
So what am I doing wrong and how do I make it work?
Thanks


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~   ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~   ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

RE: Powershell and dos batch

2012-06-06 Thread itli...@imcu.com
Ok better. 

Now I get a bunch of red letter complaining about being digitally
signed?

 

From: Damien Solodow [mailto:damien.solo...@harrison.edu] 
Posted At: Wednesday, June 06, 2012 12:22 PM
Posted To: itli...@imcu.com
Conversation: Powershell and dos batch
Subject: RE: Powershell and dos batch

 

Try this for your batch file:

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -file
e:\in01\oper\task\BackupJob.ps1

 

 

DAMIEN SOLODOW

Systems Engineer

317.447.6033 (office)

317.447.6014 (fax)

HARRISON COLLEGE

 

From: itli...@imcu.com [mailto:itli...@imcu.com] 
Sent: Wednesday, June 06, 2012 12:08 PM
To: NT System Admin Issues
Subject: Powershell and dos batch

 

I have need to running a powershell script for Backup Exec 2012 through
a DOS batch file.

Here is what I have so far:

 

::Batch File

::powershell

 

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
"'e:\in01\oper\task\BackupJob.ps1'"

exit

___

BackupJob.ps1

Import-Module BEMCLI | Get-BEJob -Name "BackupJob-Full" | Start-BEJob |
exit

 

 

Where the BackupJob is already set up in the GUI library on the server.

I get nothing.

The batch file just finishes.

I put a pause after it and I see no errors?

So what am I doing wrong and how do I make it work?

Thanks

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin