Hello All
I am writing a code in VB.net and trying to call Get-MoveRequestStatistics | ft DisplayName, Status, RemoteDatabaseName, TargetDatabase,TotalMailboxSize,PercentComplete from O365 remote runspace. When i run the code it throws me a error message :
An unhandled exception of type 'System.Management.Automation.RemoteException' occurred in System.Management.Automation.dll
Additional information: A parameter cannot be found that matches parameter name 'DisplayName,Status,PercentComplete'.
I tried changing the code by mentioning only one parameter still no luck. Need suggestion how to pipe the parameters to command in VB.net
Here is my code for reference:
Dim runspace As Runspace = System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(MyConnectionInfo.Instance.connectionInfo)
runspace.Open()
Dim plPileLine As Pipeline = runspace.CreatePipeline()
Dim gmGetMove As New Command("Get-MoveRequestStatistics")
gmGetMove.Parameters.Add("DisplayName")
gmGetMove.Parameters.Add("Status")
gmGetMove.Parameters.Add("PercentComplete")
plPileLine.Commands.Add(gmGetMove)
'plPileLine.Commands.Add("Out-String")
Dim RsResultsresults = plPileLine.Invoke()
thanks
Sriram
Thanks Sriram