RE: ex2k7 powershell help

2012-06-27 Thread Michael B. Smith
powershell help Long story short: when I open any mailbox in the console I get a message about corrupt data. Turns out every mailbox has for mailbox database. I see the command where I can specify the mailbox database for a given account. My powershell fu, however, is lacking. How do I iterate

ex2k7 powershell help

2012-06-27 Thread Daniel Chenault
Long story short: when I open any mailbox in the console I get a message about corrupt data. Turns out every mailbox has for mailbox database. I see the command where I can specify the mailbox database for a given account. My powershell fu, however, is lacking. How do I iterate through each obj

RE: Powershell help

2011-09-06 Thread Joseph L. Casale
Thanks Michael! Wish ms had a publicly available bug searching tool, life would be so much easier... jlc -Original Message- From: Michael B. Smith [mailto:mich...@smithcons.com] Sent: Tuesday, September 06, 2011 6:59 AM To: NT System Admin Issues Subject: RE: Powershell help It is

RE: Powershell help

2011-09-06 Thread Michael B. Smith
ubject: RE: Powershell help Probably more to do with my inexperience; Get-Content acts like the parameters suggest for -ea 0|3. Get-ADOrganizationalUnit bails out in a display of glorious red no matter how you attempt to deal with it if the OU doesn't exist. jlc -Original Message- From: M

RE: Powershell help

2011-09-06 Thread Joseph L. Casale
Smith [mailto:mich...@smithcons.com] Sent: Monday, September 05, 2011 6:13 AM To: NT System Admin Issues Subject: RE: Powershell help I'd like to know which cmdlets (from Microsoft) don't work as expected with EA. are implemented by PowerShell itself, not the individual cmdlet. Now, whether

RE: Powershell help

2011-09-05 Thread Michael B. Smith
NT System Admin Issues Subject: RE: Powershell help Unfortunately, not all cmdlets work as expected with ea. Some ignore the stop or inquire params. I simply rethought how the should be done and the script works as expected. Thanks, jlc -Original Message- From: Webster [mailto:webs...@carlweb

RE: Powershell help

2011-09-04 Thread Joseph L. Casale
:17 PM To: NT System Admin Issues Subject: RE: Powershell help Try adding -ea 0 to the end of your stmt. ea means ErrorAction. Google that. Carl Webster Consultant and Citrix Technology Professional http://www.CarlWebster.com From: Joseph L. Casale

RE: Powershell help

2011-09-03 Thread Webster
:45 PM To: NT System Admin Issues Subject: Powershell help Guys, I am sure the answer here is simple, but what’s an elegant way to handle the case where I need to test if an OU exists: Get-ADOrganizationalUnit -Identity "ou=$someOU,$root" and mask the error and simply bail or proceed

Re: Powershell help

2011-05-13 Thread Steven Peck
Sure, but in this case there are posh code examples stored long term and there is a community and cmdlets around it. On Fri, May 13, 2011 at 10:49 AM, Ben Scott wrote: > On Fri, May 13, 2011 at 1:01 PM, Steven Peck wrote: > >>> http://pastebin.com is very useful for this sort of thing. > >> > >

RE: Powershell help

2011-05-13 Thread Webster
Except for the email stuff, it worked perfect on my Win7 PC. Webster From: Michael B. Smith [mailto:mich...@smithcons.com] Subject: RE: Powershell help So.. I replied to him offlist. But the application issue is pretty generic. Note that I am not a master-developer. I just get by

RE: Powershell help

2011-05-13 Thread Michael B. Smith
I'm sure it's already covered on 100s of C, C++, and C# blogs. :-P Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: Webster [mailto:carlwebs...@gmail.com] Sent: Friday, May 13, 2011 1:57 PM To: NT System Admin Issues Subject: RE: Powershell h

RE: Powershell help

2011-05-13 Thread Webster
Looks an article for your blog. Webster From: Michael B. Smith [mailto:mich...@smithcons.com] Subject: RE: Powershell help So.. I replied to him offlist. But the application issue is pretty generic. Note that I am not a master-developer. I just get by. There are 3 things at

Re: Powershell help

2011-05-13 Thread Ben Scott
On Fri, May 13, 2011 at 1:01 PM, Steven Peck wrote: >>> http://pastebin.com is very useful for this sort of thing. >> >> http://poshcode.org/ not pastebin :) I prefer just having to remember one site, rather than having to remember a different pastbin-clone for every language. :) -- Ben ~ Fi

RE: Powershell help

2011-05-13 Thread Michael B. Smith
e and execute it yourself. This is not the only way to handle these issues. But the concepts are the same whether you use this linear methodology or try/catch/finally or a PSObject-based solution. Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: Webster [mailto

Re: Powershell help

2011-05-13 Thread Steven Peck
cough http://poshcode.org/ not pastebin :) On Fri, May 13, 2011 at 9:47 AM, Ben Scott wrote: > On Fri, May 13, 2011 at 11:46 AM, Crawford, Scott > wrote: > > …and if you don’t have a preference, I’d like to see it on list. I learn > a > > lot watching these debugging sessions. J > > http://pa

Re: Powershell help

2011-05-13 Thread Ben Scott
On Fri, May 13, 2011 at 11:46 AM, Crawford, Scott wrote: > …and if you don’t have a preference, I’d like to see it on list. I learn a > lot watching these debugging sessions. J http://pastebin.com is very useful for this sort of thing. Syntax highlighting, and it can show diffs on changes, witho

RE: Powershell help

2011-05-13 Thread Webster
Same here. Webster From: Crawford, Scott [mailto:crawfo...@evangel.edu] Subject: RE: Powershell help .and if you don't have a preference, I'd like to see it on list. I learn a lot watching these debugging sessions. J From: Michael B. Smith [mailto:mich...@smi

RE: Powershell help

2011-05-13 Thread Crawford, Scott
...and if you don't have a preference, I'd like to see it on list. I learn a lot watching these debugging sessions. :) From: Michael B. Smith [mailto:mich...@smithcons.com] Sent: Friday, May 13, 2011 10:09 AM To: NT System Admin Issues Subject: RE: Powershell help You are going to h

RE: Powershell help

2011-05-13 Thread Michael B. Smith
ystem Admin Issues Subject: RE: Powershell help Michael, For the life of me, I can't get that saved attachment to delete after being saved? I don't know what I holding it open? Any idea what I may be overlooking? Thanks for everything! jlc From: Michael B. Smith [mailto:mich...@smit

RE: Powershell help

2011-05-12 Thread Joseph L. Casale
AM To: NT System Admin Issues Subject: RE: Powershell help Yes, it does look promising. To clean up (good for you, so few people bother in PowerShell to clean up) I think this should do it: $mailer = new-object Net.Mail.SMTPclient($SMTPserver, $SMTPserverport) $msg = new-object Net.Mail.MailMessage(

Re: Powershell help

2011-05-11 Thread Steven Peck
.@gmail.com] > *Sent:* Wednesday, May 11, 2011 1:26 PM > > *To:* NT System Admin Issues > *Subject:* Re: Powershell help > > > > Michael B. Smith wrote: > > I don’t consider myself a master-developer. > > > > > > Well crap, that lowers my opinion of

RE: Powershell help

2011-05-11 Thread Michael B. Smith
om: Steven Peck [mailto:sep...@gmail.com] Sent: Wednesday, May 11, 2011 1:26 PM To: NT System Admin Issues Subject: Re: Powershell help Michael B. Smith mailto:mich...@smithcons.com>> wrote: I don't consider myself a master-developer. Well crap, that lowers my opinion of my own limi

RE: Powershell help

2011-05-11 Thread Michael B. Smith
From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] Sent: Wednesday, May 11, 2011 1:30 PM To: NT System Admin Issues Subject: RE: Powershell help Thanks Michael, Is this how I accomplish that: PS D:\> $adTypeText = 2 PS D:\> $objMail = New-Object -comobject "CDO.Message" PS

RE: Powershell help

2011-05-11 Thread Joseph L. Casale
ent) $msg.attachments.add($attachment) $mailer.send($msg) I can't cleanup the working directory when I am done until that script exits. Thanks! jlc From: Michael B. Smith [mailto:mich...@smithcons.com] Sent: Wednesday, May 11, 2011 11:19 AM To: NT System Admin Issu

Re: Powershell help

2011-05-11 Thread Steven Peck
MVP > > http://TheEssentialExchange.com > > > > *From:* Joseph L. Casale [mailto:jcas...@activenetwerx.com] > *Sent:* Wednesday, May 11, 2011 12:05 PM > *To:* NT System Admin Issues > *Subject:* Powershell help > > > > I am using Net.Mail.SMTPclient to send an e

RE: Powershell help

2011-05-11 Thread Michael B. Smith
TheEssentialExchange.com From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] Sent: Wednesday, May 11, 2011 12:05 PM To: NT System Admin Issues Subject: Powershell help I am using Net.Mail.SMTPclient to send an email with an attatchment as Send-MailMessage doesn't allow me to change the

RE: Powershell Help

2010-10-20 Thread Brian Desmond
:jcas...@activenetwerx.com] Sent: Wednesday, October 20, 2010 11:13 AM To: NT System Admin Issues Subject: Powershell Help Guys, I need a golden nugget here, lol (I am about to hit a brick wall:) from exhaustion). I misplaced an old dos script I used, so I am writing it in powershell. How do I search a

Re: Powershell Help

2010-10-20 Thread Steven Peck
{ echo $_.FullName; } > > > > Regards, > > > > Michael B. Smith > > Consultant and Exchange MVP > > http://TheEssentialExchange.com > > > > *From:* Joseph L. Casale [mailto:jcas...@activenetwerx.com] > *Sent:* Wednesday, October 20, 2010 2:13 PM &g

RE: Powershell Help

2010-10-20 Thread Michael B. Smith
dir -path c:\path\to\folder\*.abc |% { echo $_.FullName; } Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: Joseph L. Casale [mailto:jcas...@activenetwerx.com] Sent: Wednesday, October 20, 2010 2:13 PM To: NT System Admin Issues Subject: Powershell

Powershell Help

2010-10-20 Thread Joseph L. Casale
Guys, I need a golden nugget here, lol (I am about to hit a brick wall:) from exhaustion). I misplaced an old dos script I used, so I am writing it in powershell. How do I search a path for all files of type '*.abc' and then loop through and execute a command using the full path of each occurre

RE: Powershell help

2010-03-04 Thread Jim Slattery
] Sent: Thursday, March 04, 2010 4:34 PM To: NT System Admin Issues Subject: RE: Powershell help Thanks. I'll take a look. -Original Message- From: Steven Peck [mailto:sep...@gmail.com] Sent: Thursday, March 04, 2010 4:32 PM To: NT System Admin Issues Subject: Re: Powershell help v

RE: Powershell help

2010-03-04 Thread Glen Johnson
Thanks. I'll take a look. -Original Message- From: Steven Peck [mailto:sep...@gmail.com] Sent: Thursday, March 04, 2010 4:32 PM To: NT System Admin Issues Subject: Re: Powershell help v1 but got the basics down and is free. http://powershell.com/cs/blogs/ebook/ On Thu, Mar 4, 20

Re: Powershell help

2010-03-04 Thread Steven Peck
[mailto:mich...@smithcons.com] > Sent: Thursday, March 04, 2010 1:36 PM > To: NT System Admin Issues > Subject: RE: Powershell help > > > > Yeah, this isn’t that easy. > > > > I’d recommend you use adfind with the –excldn argument. > > > > Otherwise wh

RE: Powershell help

2010-03-04 Thread Glen Johnson
Thanks. One of my goals for this year is to learn PS so I'll have to do lots more reading. From: Michael B. Smith [mailto:mich...@smithcons.com] Sent: Thursday, March 04, 2010 1:36 PM To: NT System Admin Issues Subject: RE: Powershell help Yeah, this isn't that easy. I&#

RE: Powershell help

2010-03-04 Thread Michael B. Smith
Consultant and Exchange MVP http://TheEssentialExchange.com From: Glen Johnson [mailto:gjohn...@vhcc.edu] Sent: Thursday, March 04, 2010 1:27 PM To: NT System Admin Issues Subject: Powershell help Ok folks. I'm just getting started with PS but I bet someone out there will spot my errors r

Powershell help

2010-03-04 Thread Glen Johnson
Ok folks. I'm just getting started with PS but I bet someone out there will spot my errors right away. BTW, most of this I found googling so I can't take credit for writing it. What I want to do is retrieve a list of all AD users, except those in the In-Active Users, OU. I'd like the output to