Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-27-2015, 09:50 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
PowerShell remote

I am having trouble just doing a simple DIR from powershell on a remote server, its just sits there, I looked at the server and I can see a process started but it does nothing.

If I run the same on the local machine its fine.

please help!
Reply With Quote
  #2  
Old 08-27-2015, 10:28 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
I do have the option to Show Application Window checked.

Before it would just hang there at
---------------------------------
Starting C:\Windows\System32\WindowsPowerShell\v1.0\powersh ell.exe on USSBYAPPM8
97A.acetst.com...
-------------------------------

I went to the server and set PS to unrestricted and then test and back again to restricted and now it displays

--------------------------
Starting C:\Windows\System32\WindowsPowerShell\v1.0\powersh ell.exe on USSBYAPPM8
97A.acetst.com...
AuthorizationManager check failed.
At line:1 char:2
+ & <<<< \\USSBYAPPM897A.acetst.com\c$\Sample.ps1
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException

----------------------------
Reply With Quote
  #3  
Old 08-27-2015, 10:37 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Please send the info from http://www.kinook.com/Forum/showthread.php?t=3044
Reply With Quote
  #4  
Old 08-27-2015, 10:47 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
VB Version 8.7.0.1
PSExec 2.11
Reply With Quote
  #5  
Old 08-27-2015, 10:52 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Please send or post the .bld file and log file.
Reply With Quote
  #6  
Old 08-27-2015, 11:23 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
see attached, I removed the account info
Attached Files
File Type: bld Powershell - test.bld (836 Bytes, 2644 views)
Reply With Quote
  #7  
Old 08-27-2015, 11:54 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
What version+SP+bitness of Windows on the local machine and remote machine?
Reply With Quote
  #8  
Old 08-27-2015, 11:56 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
Both are 2008 R2 Standard SP1
Reply With Quote
  #9  
Old 08-27-2015, 09:58 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
This is fixed in the latest build (VisBuildPro.exe 9.0.0.2 in Help | About after installing). There were two problems:

1) PowerShell didn't like the path to the temporary script specified as \\computer\c$\xyz.ps1 on the remote call -- this was changed to reference as C:\xyz.ps1 instead.

2) PowerShell doesn't exit when called remotely -- a 'None' option was added to the Input format field on the Options tab, which must be used for remote calls to PowerShell to avoid this (see here for details).

Also, you should be able to specify Remote Signed rather than Unrestricted for the Execution policy on the Options tab.
Reply With Quote
  #10  
Old 08-28-2015, 08:35 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
I will give it a try. I have a custom action that I wrote in VS2010 FW 4.0, that I use in my scripts. If I update to Version 9, I want to update the custom action to VS2013, can I use FW 4.5.2 for my custom action with VB 9x?
Reply With Quote
  #11  
Old 08-28-2015, 09:31 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Yes, that should work.
Reply With Quote
  #12  
Old 08-28-2015, 11:19 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
So far so good the power shell is working now I will test the upgrade of my custom action later.

I did notice that from 2012 r2 to 2012 r2 I didnt change the setting none but still in v9 it worked.
Reply With Quote
  #13  
Old 08-28-2015, 11:31 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Maybe that was fixed in PowerShell v4.
Reply With Quote
  #14  
Old 08-31-2015, 08:07 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
I have upgraded to v9x and the Power Shell scripts are now working thanks.

I am seeing something unfamiliar with the new version. When I open a script without setting any breakpoints and close VB I see a .user file created. Whats that about?
Reply With Quote
  #15  
Old 08-31-2015, 08:25 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
In v9 by default, Visual Build remembers the previously selected steps when reopening a project (stored in the .user file). To prevent this, uncheck Tools | User Options | General | Remember selected steps when reopening projects. The .bld.user file will still be created if you set breakpoints in a project (same as with v8).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 01:07 PM.


Copyright © 1999-2023 Kinook Software, Inc.