Click here to Skip to main content
15,886,137 members
Home / Discussions / C#
   

C#

 
AnswerRe: limit memory c# Pin
Luc Pattyn12-Mar-12 10:35
sitebuilderLuc Pattyn12-Mar-12 10:35 
GeneralRe: limit memory c# Pin
Dave Kreskowiak12-Mar-12 10:08
mveDave Kreskowiak12-Mar-12 10:08 
AnswerRe: limit memory c# Pin
OriginalGriff12-Mar-12 7:28
mveOriginalGriff12-Mar-12 7:28 
AnswerRe: limit memory c# Pin
jschell12-Mar-12 8:55
jschell12-Mar-12 8:55 
Questiondefining a row grid within a column grid, c#, wpf Pin
Sutton Mehaffey12-Mar-12 3:37
Sutton Mehaffey12-Mar-12 3:37 
AnswerRe: defining a row grid within a column grid, c#, wpf Pin
Wes Aday12-Mar-12 3:55
professionalWes Aday12-Mar-12 3:55 
AnswerDuplicate post Pin
Pete O'Hanlon12-Mar-12 4:10
mvePete O'Hanlon12-Mar-12 4:10 
QuestionProblem with Exchange server monitoring Pin
Sebastian T Xavier11-Mar-12 19:05
Sebastian T Xavier11-Mar-12 19:05 
Hello All,

I have a problem with Exchange server 2007. I was trying to execute the following query get-mailbox | FL. This query was working when I tried it in the Exchange server's power shell console after executing following query Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin.

But I need it to be executed from a remote machine, so I have executed it from my powershell console , as follows...

$server='192.168.1.23';$pwd= convertto-securestring '123' -asplaintext -force;$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist 'exchangeserver\Administrator',$pwd; invoke-command -computername $server -credential $cred -scriptblock {Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin get-mailbox | FL}

But, this query fails with the following error...
A positional parameter cannot be found that accepts argument 'get-mailbox'.

  +CategoryInfo  :InvalidArgument:  {:} [Add-PSSnapin], ParameterBIndingException
  +FullyQualifiedErrorId: PositionalParameterNotFound,Microsoft.Powershell.Commands.AddPSSnapinCommand

I have modified this query again and added a ; after the snapin add section.

$server='192.168.1.23';$pwd= convertto-securestring '123' -asplaintext -force;$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist 'exchangeserver\Administrator',$pwd; invoke-command -computername $server -credential $cred -scriptblock {Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin; get-mailbox | FL}

This is also fails with the following error.
Active Directory server exchangeserver.xxxxxx.local is not available. Error message: The supplied credential is invalid. 

     + CategoryInfo           :   NotSpecified: <0:int32> [Get-MailBox],ADOperationException
     + FullyQualifiedErrorId  :   A2B6F75B,Microsoft.Exchange.Management.RecipientTasks.GetMailbox


Then I have removed the add-snap-in section from the command and executed again.

$server='192.168.1.23';$pwd= convertto-securestring '123' -asplaintext -force;$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist 'exchangeserver\Administrator',$pwd; invoke-command -computername $server -credential $cred -scriptblock {get-mailbox | FL}

Now it throws another error message.
The term 'get-mailbox' is not recognised as the name of a cmdlet, function, script file or operable program.
Check the spelling of the name, or if a path was included, verify that the path is corerct and try again.

     + CategoryInfo           :   ObjectNotFound: <get-mailbox:String> [],CommandNotFoundException
     + FullyQualifiedErrorId  :   CommandNotFoundException

Can someone help me on this?

Thanks in advance
Sebastian

QuestionMethods of a collection class are not always called Pin
CDP180211-Mar-12 16:52
CDP180211-Mar-12 16:52 
AnswerRe: Methods of a collection class are not always called Pin
Luc Pattyn11-Mar-12 17:26
sitebuilderLuc Pattyn11-Mar-12 17:26 
GeneralRe: Methods of a collection class are not always called Pin
CDP180211-Mar-12 23:34
CDP180211-Mar-12 23:34 
GeneralRe: Methods of a collection class are not always called Pin
lukeer12-Mar-12 3:11
lukeer12-Mar-12 3:11 
AnswerRe: Methods of a collection class are not always called Pin
Luc Pattyn12-Mar-12 3:26
sitebuilderLuc Pattyn12-Mar-12 3:26 
GeneralRe: Methods of a collection class are not always called Pin
CDP180212-Mar-12 4:03
CDP180212-Mar-12 4:03 
AnswerRe: Methods of a collection class are not always called Pin
Luc Pattyn12-Mar-12 4:23
sitebuilderLuc Pattyn12-Mar-12 4:23 
GeneralRe: Methods of a collection class are not always called Pin
CDP180212-Mar-12 21:21
CDP180212-Mar-12 21:21 
AnswerRe: Methods of a collection class are not always called Pin
Pete O'Hanlon11-Mar-12 20:01
mvePete O'Hanlon11-Mar-12 20:01 
GeneralRe: Methods of a collection class are not always called Pin
CDP180212-Mar-12 0:07
CDP180212-Mar-12 0:07 
GeneralRe: Methods of a collection class are not always called Pin
Pete O'Hanlon12-Mar-12 0:43
mvePete O'Hanlon12-Mar-12 0:43 
AnswerRe: Methods of a collection class are not always called Pin
Bernhard Hiller11-Mar-12 21:18
Bernhard Hiller11-Mar-12 21:18 
GeneralRe: Methods of a collection class are not always called Pin
CDP180212-Mar-12 0:27
CDP180212-Mar-12 0:27 
QuestionExport to Excel - DropDownList Pin
Andrew Woodward11-Mar-12 10:12
Andrew Woodward11-Mar-12 10:12 
Questioninsert image in datagrid Pin
MemberDotNetting11-Mar-12 9:06
MemberDotNetting11-Mar-12 9:06 
AnswerRe: insert image in datagrid Pin
OriginalGriff11-Mar-12 9:41
mveOriginalGriff11-Mar-12 9:41 
GeneralRe: insert image in datagrid Pin
MemberDotNetting12-Mar-12 7:09
MemberDotNetting12-Mar-12 7:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.