Ok, this is a going to be an easy for someone to answer...
I am new to the PowerShell ProjectWise concept and trying hard to learn to get needed functionality.
But I cannot get Powershell to recognize that the Modules are installed and the functions exposed...
Supposedly I have the PWPS_DAB Module installed.
Tried the standard "Windows PowerShell ISE" and got the message that the architecture was wrong...
Import-Module -Name PWPS
Import-Module -Name PWPS_DAB -DisableNameChecking
Import-Module : The specified module 'PWPS' was not loaded because no valid module file was found in any module directory.
At line:1 char:1
+ Import-Module -Name PWPS
+ CategoryInfo : ResourceUnavailable: (PWPS:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Import-Module : The current processor architecture is: Amd64. The module 'C:\Program
Files\WindowsPowerShell\Modules\PWPS_DAB\220.127.116.11\PWPS_DAB.psd1' requires the following architecture: X86.
At line:3 char:1
+ Import-Module -Name PWPS_DAB -DisableNameChecking
+ CategoryInfo : ResourceUnavailable: (C:\Program File...0\PWPS_DAB.psd1:String) [Import-Module], InvalidOperationExce
+ FullyQualifiedErrorId : Modules_InvalidProcessorArchitecture,Microsoft.PowerShell.Commands.ImportModuleCommand
So then I tried the "Windows PowerShell ISE (x86)" and got the message that "open-pwconnection" is not recognized...
$result = open-pwconnection "any"
The term 'open-pwconnection' is not recognized 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 correct and try again.At line:1 char:11
+ $result = open-pwconnection "PW Dev"
+ CategoryInfo : ObjectNotFound: (open-pwconnection:String) , CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Neither ISE session will show the PW Module Commands in the "Command" Add-on.
What is the obvious thing that I am missing?
You’re running the 64-bit version of powershell, you need to run the 32-bit version.
I also tried the "Windows PowerShell ISE (x86)", see the bottom half of the post...
But you did make me realize that I did the install of the PWPS_DAB Module in the 64bit version of ISE, so I did the "Uninstall-Module" there and went to the x86 ISE and installed, now it can see the PW PowerShell Modules...
Thanks for the poke, I knew it had to be something obvious but not obvious...!!!
This also begs the question of "when" for the x64 version, or will the x86 be all for the foreseeable future?
I can see lots of "PW" functions/cmdlets, but not "open-pwconnection" or "close-pwconnection" as seen in some example snippets.
Is this another newbie obvious but not obvious problem?
Where can we get any documentation on the commands and inputs?
Have you installed the PWPS module provided with the Connect Edition version of ProjectWise Administrator?
Yeah, got this to work... had to use the open/close from PWPS and the functions from PWPS_DAB.
Basically did word searches in the forum and played connect-the-dots with snippets of code and ideas until it made sense...
I now have evolved a batch file, holding 21 calls to call PowerShell with a PS1 that takes command line variables, that does a login to the datasource, a find to get a list of files in a pw folder, a foreach loop to echo the files found, and a checkout -copyout to dump them in a server folder.
I can also do the Import of a Server Folder and sync it to a PW Folder.
Still working on 2 problems:
Hi John, did you ever figure out why "open-pwconnection" cmdlets were not appearing? i am a very new user, and i am having the same problem. Any advice?