ActivePosh and Powerpoint 3.0

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
Locked
User avatar
slittle
Posts: 8
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Thu Oct 13, 2011 12:09 pm

ActivePosh and Powerpoint 3.0

Post by slittle »

This is my first post. I have used the ActivexPosh.dll with from within a scripting language for a variety of tasks in Powershell 2.0. I wanted to test it on Win7 with 3.0 - one simple script had a function within a function

function Get-HtmlTable { param ( [Parameter(ValueFromPipeLineByPropertyName)] $ParsedHtml )
Process { $ParsedHtml.getElementsByTagName("table") | Where classname -eq 'wikitable' } }
and work fine from Powershell and Powershell_ise, but when called from ActivePosh error that line 4 requires an "=" after a named paremeter.

Another script:
# Return the results from the ApprovedEvents service $url = "http://www.communitymegaphone.com/ws/CM ... 20eq%20'VA'" $client = new-object net.webclient <#Data will be returned as JSON, however if youcomment out the client.Headers the data will bereturned as XML#>$client.Headers.Add("accept", "application/json") $s = $client.DownloadString($url)$s | ConvertFrom-JSON
worked (not that well) from PS and ISE, but when run from ActivePosh the error was "ConvertFrom-JSON is not recognized as a cmdlet".

As I am a newbie these could be dumb mistakes on my part, but are there any issues with the dll and version 3.0?

TIA

Stan


User avatar
slittle
Posts: 8
Joined: Thu Oct 13, 2011 12:09 pm

ActivePosh and Powerpoint 3.0

Post by slittle »

I found that by changing

[Parameter(ValueFromPipeLineByPropertyName)]

to [Parameter(ValueFromPipeLineByPropertyName=$true)] I get over that error (although it still works w.out -$true when run directly from PS 3.0).

I still cannot use any of the new cmdlets, viz. Invoke-WebRequest with ActivexPosh, getting a 'cmdlet not found' error, but again all work when called from 3.0 directly.

What can I try?

User avatar
Alexander Riedel
Posts: 7265
Joined: Tue May 29, 2007 4:43 pm

ActivePosh and Powerpoint 3.0

Post by Alexander Riedel »

PowerShell 3 is not released. Not even complete yet. I would go and ask Microsoft why there are compatibility issues. My guess is that with a host built against a prior version of PowerShell you can't use the new cmdlets.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
slittle
Posts: 8
Joined: Thu Oct 13, 2011 12:09 pm

ActivePosh and Powerpoint 3.0

Post by slittle »


User avatar
Alexander Riedel
Posts: 7265
Joined: Tue May 29, 2007 4:43 pm

ActivePosh and Powerpoint 3.0

Post by Alexander Riedel »

It's a CTP. Not a release.

"This software is a pre-release version. Features and behavior are likely to change before the final release.

This preview release is designed to enable the community to experience and review the preliminary designs and direction of key features Windows PowerShell 3.0 and to solicit feedback before features are finalized."
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
slittle
Posts: 8
Joined: Thu Oct 13, 2011 12:09 pm

ActivePosh and Powerpoint 3.0

Post by slittle »

Understood... sorry. I did notice about 1500 bug reports. I guess I got a little excited about the Json stuff.

Locked