You need a close paren after $audit_csv on foreach line

[DefaultEmailSignatureFile]

From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On 
Behalf Of Daniel Chenault
Sent: Monday, December 16, 2013 4:51 PM
To: powershell@lists.myitforum.com
Subject: [powershell] bah

I'm sure this is a kick-me answer but for the life of me I don't see it. 
Disclaimer: not new to coding but PoSH is not something I've a lot of 
experience in. Probably a simple syntax error. I've looked at multiple blogs 
and sites and don't get what the problem is.

=============================
$audit_csv = import-csv ".\us31a hex audit_dtc - copy.csv"
foreach ($audit_obj in $audit_csv
{
    $field = $audit_obj.upn
    Disable-Mailbox $field
}
=============================

It keeps complaining I'm missing the closing bracket after defining the 
foreach. Uh... no, there it is on the last line.

================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1


================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

<<inline: image001.jpg>>

Reply via email to