Error in PowerScript

Dec 20, 2010 at 9:39 AM

Hi I tried running script using the Power Script But It produces the error.  

It gave me following error. Failed to load windows powershell console file "IISLogFileArchiver.psc1" : Whitespaces is not allowed at location Line : 12 char:3

The line it points is this

& "C:\Program Files (x86)\Log Parser 2.2\LogParser.exe" ("SELECT * FROM " + $log.fullname + " TO LogTable") -o:SQL -server:PEANUT -driver:"SQL Server" -database:pep02_extendedUserProfiles -createtable:OFF -clearTable:OFF

Does it have anything to do with Powershell version. I think I have V1.0 at moment.

Dec 20, 2010 at 10:19 AM

Hi,

I just check using get-host command. My Powershell version is 2.0

Coordinator
Dec 27, 2010 at 2:58 AM

My first thought would be to try using the "short name" for the PS path. You can get that at the command prompt by doing dir /x at each level. For C:\Program Files (x86) it should be C:\Progra~2, I think. You will have to check what Log Parser 2.2 shortens to (I forget the algorithm - I used to know it by heart).

The other thing I am wondering is if $log.fullname points to a path with spaces in it? I could see that causing an issue, too.

Dec 30, 2010 at 5:46 AM
Hi Dullroar,

Thanks you for your replay...

I am not sure what the problem was but I had to use following command to before executing the script

powershell -Command Set-ExecutionPolicy RemoteSigned

Than I could manage to run the script.


From: [email removed]
To: [email removed]
Date: Sun, 26 Dec 2010 18:58:17 -0800
Subject: Re: Error in PowerScript [PopularPages:238975]

From: dullroar

My first thought would be to try using the "short name" for the PS path. You can get that at the command prompt by doing dir /x at each level. For C:\Program Files (x86) it should be C:\Progra~2, I think. You will have to check what Log Parser 2.2 shortens to (I forget the algorithm - I used to know it by heart).
The other thing I am wondering is if $log.fullname points to a path with spaces in it? I could see that causing an issue, too.
Read the full discussion online.
To add a post to this discussion, reply to this email (PopularPages@discussions.codeplex.com)
To start a new discussion for this project, email PopularPages@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com