Problem with PSMobile and Get-ChildItem

Mar 21, 2009 at 8:59 PM

I can add the PSMobile snapin and cd to mobile: .

However, when I use "dir" or "Get-ChildItem", I get the following error:
PS Mobile:\temp> Get-ChildItem
The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing meth
ods, and only from that same thread. Validate that the cmdlet makes these calls correctly, or please contact Microsoft Support Services.
At line:1 char:1
+  <<<< Get-ChildItem
    + CategoryInfo          : InvalidOperation: (:) [], PSInvalidOperationException
    + FullyQualifiedErrorId : InvalidOperation
Any idea? I just tried to reproduce what I can see on

Mar 27, 2009 at 2:17 AM
Hi Snark,

This is a bug when using PSMobile in PowerShell v2.0 - I will upate it over the weekened to get around this. It was only ever tested in v1.0.

- Oisin
Mar 27, 2009 at 9:15 AM
Thanks oisin. I look forward to the update.

Apr 8, 2009 at 7:49 PM
Hi oisin, any news on this?
May 13, 2009 at 3:55 AM

Hey Snark, it turns out this is a bug in PowerShell 2.0, not in my provider. It will be fixed in the PowerShell 2 RC (with Win7RC).