w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Powershell Remoting with credential
You can do: $cred = get-credential #fill you credential in the pop-up window and then: Invoke-Command -ComputerName mycomputer -ScriptBlock { Get-ChildItem C: } -credential $cred Remember that the password in $cred is easily recoverable in clear text!

Categories : Powershell

Powershell remoting issue
Do you have a matching user account on server B? Have you tried doing: Enter-PSSession -Computername ServerB -Credential (Get-Credential) and setting your domain username/password?

Categories : Powershell

PowerShell Workflow Exchange Remoting
I've tried to make this work, but haven't found a way. Taking a look at Running Windows PowerShell Commands in a Workflow, it says, "To run the commands in inlinescript activity on remote computers, you need to establish and manage connections to the remote computer from within the inlinescript block and then run the commands remotely." Assuming I'm understanding that statement correctly, I don't think you can establish a session outside of the InlineScript block and then use it inside the block. I've tried several ways of trying to pass the $session into the InlineScript, but it is always $null. This limitation makes sense to me because I don't see how a Workflow could use one remote session or connection to simultaneously execute multiple commands on the remote server. I think that yo

Categories : Powershell

Powershell Remoting: Transport Exception
I have no way to test this, but after looking at another example at an MSDN Blog, it seems that you need to update your connInfo line to add the servername, no matter which credentials you choose to use. var connInfo = new WSManConnectionInfo(new Uri("https://server.domain.com/powershell", ADD_SERVER_NAME_HERE), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", credentials) { AuthenticationMechanism = AuthenticationMechanism.Negotiate };

Categories : Powershell

Powershell remoting - creating objects remotely
Invoke-Command returns the output, not the objects created. If you want to remotely operate COM objects via Invoke-Command you have to include the code in the script block: $foldername = "C: est" $computername ="remotecomputer" Invoke-Command -ComputerName $computername -ScriptBlock { $newquotaobj = New-Object -ComObject Fsrm.FsrmQuotaManager $newquotasrc = $newquotaobj.GetQuota($args[0]) $newquotasrc # <-- this will be returned to the local host } -ArgumentList $foldername

Categories : Powershell

Powershell Remoting Failing After Server Restore
Based on this Microsoft Connect item, try adding-SessionOption (New-PSSessionOption -NoMachineProfile) to your Enter-PSSession command. I have no idea why this would be needed, but it's worth a shot.

Categories : Powershell

How can I expose an embedded PowerShell runspace to remoting
What about using an Http channel like Scott Hanselman wrote about some time ago? http://www.hanselman.com/blog/ScriptBlockAndRunspaceRemotingInPowerShell.aspx

Categories : Dotnet

Powershell remoting: Cannot connect to Windows 2012 EC2 Instance
First you need to sort out if a connection can be established to the remote machine. Easiest is to try the following command from the windows command prompt: telnet <ip> 5985 If the telnet client is not installed, add it via add/remove windows components. If a connection is not possible, you will get an error. This is the most likely error. Possible reasons: Client side firewall (local or network) preventing the connection EC2 Security group configuration Server firewall rule. Since you can access the remote machine over remote desktop, run the same command on the server to make sure that the WinRM service is actually working and listening on the default port. If a connection is possible from the client machine, open the event viewer on the server and go to: "Applications and

Categories : Windows

Powershell remoting - Policy does not allow the delegation of user credentials
I finally got it to work thanks to this page. It provides a script that sets the required credential delegation policies by setting the appropriate registry keys directly. Once I ran that script with admin privileges, I was able to successfully establish a CredSSP connection to myserver: Enable-WSManCredSSP -Role client -DelegateComputer *.mydomain.com $allowed = @('WSMAN/*.mydomain.com') $key = 'hklm:SOFTWAREPoliciesMicrosoftWindowsCredentialsDelegation' if (!(Test-Path $key)) { md $key } New-ItemProperty -Path $key -Name AllowFreshCredentials -Value 1 -PropertyType Dword -Force $key = Join-Path $key 'AllowFreshCredentials' if (!(Test-Path $key)) { md $key } $i = 1 $allowed |% { # Script does not take into account existing entries in this key New-ItemProper

Categories : Powershell

Error when accessing UNC paths through powershell script when remoting
It looks like you're trying to modify a file on a UNC path on a secondary server. This won't work due to the age old "double hop" problem. You are on machine A, executing a remote script on B that tries to modify a file on C. Your authentication from A to B cannot be reused to connect from B to C. This is a design limitation for NTLM (windows integrated authentication.) However, all is not lost: You must use CredSSP authentication when connecting with powershell remoting from A to B, and then you can connect to C without a problem. References: http://tfl09.blogspot.ca/2013/02/powershell-remoting-double-hop-problem.html http://www.ravichaganti.com/blog/?p=1230

Categories : Visual Studio 2010

java input.readLine hangs after starting a powershell script
Use a ProcessBuilder. Any process implying a modicum of I/O should outright refuse to run via Runtime.exec(), alas, it cannot detect that. And Oracle hasn't flagged it as @Deprecated which is a pity. Anyway: final File logFile = new File("/path/to/logfile"); final ProcessBuilder pb = new ProcessBuilder("powershell", "/path/to/the/ps1"); pb.redirectOutput(Redirect.to(logFile)); pb.redirectErrorStream(true); final Process p = pb.start(); final int retcode = p.waitFor(); // deal with retcode // read result from the log file

Categories : Java

Remotely Starting Program with fork() on VM
How about this? Running in background ssh VM1 'program start' & ssh VM2 'program start' & ssh VM3 'program start' & Try it & inside ' ssh VM1 'program start &'

Categories : Linux

How to change which form opens when starting a program in VB.net
Open up your project properties (you can double-click on it in the Solution Explorer) Go to Application > Startup Form At least that's how I do it in VS 2010. Hope that does the trick for you too...

Categories : Vb.Net

lxml, flat_namespace and starting the program with or without python
So @torek you put me on the right lane. → ls -l /usr/bin/python* Which gives -rwxr-xr-x 2 root 62 2011-08-15 21:09 /usr/bin/python* -rwxr-xr-x 6 root 1 2011-08-15 21:09 /usr/bin/python-config* lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5* lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.5-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5-config* lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6* lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.6-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config* lrwxr-xr-x 1

Categories : Python

Starting another program via system() call blocks the socket
In short, based on the observed behaviors, the source of the problem is likely resulting from fork()'s behavior, as the child process will inherit a copy of the acceptor's open file descriptor. Closing the acceptor from within the child should resolve the problem. When fork() occurs, the child process inherits copies of the parent's set of open file descriptors. Here is the relevant excerpt from the fork documentation: The child inherits copies of the parent's set of open file descriptors. Each file descriptor in the child refers to the same open file description as the corresponding file descriptor in the parent. This means that the two descriptors share open file status flags, current file offset, and signal-driven I/O attributes . However, Boost.Asio has internal file descrip

Categories : C++

Error starting program installed on a remote machine
I don't think your problem is EF related. I had a similar problem as result of Microsoft's July Patch (KB2840628). A solution is the installation of KB2872041. Another solution is the update to Framework 4.5.

Categories : C#

How to suppress a program GUI when starting a process from Windows command line?
Some windows programs allow them to be run from the command line with the GUI suppressed it varies between programs. Either check the specific programs website/help/manuals/usergroups or try running from the command line with the -h -? -help or --help flags - those that do allow it normally have command line help - and look for a quiet option, (often -q --quiet or --silent are used). Also some programs are actually GUI front ends for command line back end processing so there may be a different command to run on the command line altogether - the documents are usually the place to look for that. Sorry this is effectively a long version of RTFM but there is really no completely general answer that I know of. Update This answer (from J.F. Sebastian's comment) put me on the track of: star

Categories : Python

Starting VB Script from Powershell script - works from PS environment, but not scheduled task
Try running this batch script as a scheduled task: @echo off setlocal set "programdir=C:Program Files (x86)LNGoogleCalSync" set "script=%programdir%lngsync.vbs" pushd "%programdir%" wmic process get commandline | findstr /r [l]ngs >nul || cscript "%script%" popd If that doesn't work: try replacing all MsgBox statements in the VBScript with WScript.Echo.

Categories : Powershell

How can maintain the powershell remote session throughout the program?
Finally i got the solution for my question ..its very simple one. Make the Powershell object as a static variable and clear the command after script invoke function. ps.commands.clear(); Now without affecting the current session we can execute the query easily..Let me know if any other efficient way for it. Thanks.

Categories : C#

PowerShell code running as scheduled task fails with Program Files folder
Maybe the execution policy is too restricted for this account. try to set the executionpolicy by adding -executionpolicy unrestricted in the parameters. If that failed, it would help to see the log of the scheduler.

Categories : Powershell

Remoting to azure webrole
Sounds like you might need to add a certificate to your local environment? http://www.microsoft.com/BizSpark/Azure/SetupEnvironment.aspx

Categories : Azure

Singleton or SingleCall .Net Remoting
Client-activated objects are created on the server when you create an instance using the new keyword. Hence I believe CAO suits best in the current situation. If you can suggest any better way of doing so will be great.

Categories : Dotnet

Why .Net Remoting doesn't need known types but WCF does?
You're correct - .NET remoting sends type metadata with the requests. WCF can do the same, but by default it doesn't - it's a lot of extra information which makes the requests larger and more complex to process (affecting performance). Not sending the type information also allows for loosely coupled systems, where the client and the server can version separately, and as long as they adhere to the contracts established in the original version, they will continue working. And it also allows for WCF to talk to systems written in non-NET platforms (which isn't possible with remoting or other technologies which rely on shared type information). If you really want to go with the non-known-types way, you can replace the default serializer used by WCF (the DataContractSerializer) with the NetData

Categories : Wcf

.Net remoting works from example but not from my assembly
Go and check whether the remoting service is running on port 9000. This usually happens on our side due to the fact that the port on which the server is listening is not the port you're trying to connect from the client. Also there can be firewall issues, So make sure that the port 9000 is added as an exception in the firewall.

Categories : C#

Will Reactor provide remoting?
I don't think Akka and Reactor are Apples to Apples. Reactor is purposely minimal, with only a couple external dependencies. It gives you a basic set of tools in which to write event-driven applications but it by design does not enforce a particular model. It would actually not take that long to implement a Dynamo system using Reactor components. Everything that would be needed is there and it would likely only take writing a tutorial on it to show how to wire things together. The Dynamo model that Akka uses is a proven system. Basho has done a fantastic implementation of it in Riak. It's great to see Akka following their lead in that respect. If we were to implement a Reactor clustering system, it would likely be the Dynamo model. But since a Reactor is basically just event handlers and

Categories : Misc

How to Proxy, Remoting, HttpTunnel, through IIS
Found that this is a simple IIS setting under Application Request Routing, enable Proxy: http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing

Categories : Iis

C# .NET Remoting Server and Java-Client
you could send and receive data with JSON or XML format JSON for C#: http://james.newtonking.com/pages/json-net.aspx JSON for Java: http://json.org/java/

Categories : C#

.NET Remoting and Server Activated Objects
The problem is that you're using WellKnownObjectMode.SingleCall. As the documentation says: SingleCall Every incoming message is serviced by a new object instance. Singleton Every incoming message is serviced by the same object instance. See also the documentation for RegisterWellKnownServiceType: When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as SingleCall, it is destroyed after the method call is completed. A new instance of the object is created for each method called. In your case, the statement c.Real = 4 is a call

Categories : C#

Issue in .net remoting on a PC with multiple NIC cards
Finally,We found the problem.The problem was there were multiple remoting channels in the Appdomain and eveything had same priorities,so my application was using the wrong channel all the time and this channel did not have any specific binding to it. I increased the priority for the channel which it is supposed to use,then everything started working

Categories : Dotnet

Remoting sponsor stops being called
I posted a very similar problem and answer "Sponsor's Renewal function stops being called". It might even be the same problem. I've worked around it by putting the sponsor on the server instead of the client. The server side sponsor seems to be reliably called enough to keep the remote object alive. I know this won't be a very safe solution in many cases because the client must actively disconnect the sponsor instead of just letting the lease expire.

Categories : Dotnet

jni4net - System.Runtime.Remoting.RemotingException
It seems you are trying to instantiate some type inherited or dependent on jni4net, but the problem happens on the other side of your .NET remoting. Probably you are passing instance of Java object as argument of the remoting call.

Categories : Java

How to access remote object from other computer in remoting
The message means most of the time that the client cannot find the service. You can use the following steps to determine where the connection fails: Check if the service is running on the remote machine. Check if the port number is correct. Ping the remote machine from the client. Open a telnet session to the remote machine on the port number of service. The step on which it fails gives an indication of why it is failing.

Categories : C#

How do you enable JMX remoting or custom Java args with Railo?
Tomcat uses the Apache Commons ProcRun Daemon to run as a Windows service. When editing the Java options through the GUI (typically by running [tomcat]inTomcat7w.exe) each command line option needs to be on it's own line without leading or trailing spaces. Because of the size of the text area you're given to edit the Java options, its easy to paste in several options and not notice that each option isn't separated by newlines. I've done this a few times. In your case, the clue is that the Java error shows a property which chould be a port and is actually a port, plus other options. The kind of error behavior you get though will completely depend on the validation present on the first option on a given line. As well as editing the options in the dialog, you can also get to them in

Categories : Tomcat

How to implement Spring batch remoting and still maintain order of writing?
I think you can't do that because Table are naturally unsorted. If you need them to be ordered in some way add a order column managed by writer. First partition write 1-100, second partition 101-200 and so on. Next step reader will get items order by [order column]. Holes between order column due to missing write in previous partitioners are not an issue. My 2 cents

Categories : Java

Visualforce remoting: Parameter length does not match remote action
http://www.salesforce.com/us/developer/docs/pages/Content/pages_js_remoting_example.htm Here is the simple syntax as pointed in above link.Syntax error i feel in your case . Lets resolve this with proper syntax function getParamValues(whoid, whoname) { Visualforce.remoting.Manager.invokeAction( '{!$RemoteAction.CallReportControllerExtension.getWhoId}', whoid, function(result, event){ if (event.status) { alert('RESULT WHOID',result); } }, {escape: true} ); Visualforce.remoting.Manager.invokeAction( '{!$RemoteAction.CallReportControllerExtension.getWhoName}', whoname, function(result, event){ if (event.status) { alert('RESULT WHONAME',re

Categories : Javascript

How to add OSGI service references in contexts property of httpserver (Spring remoting)?
You can, instead of using util:map, define a factory or a bean that wires in IRemoteServiceProvider and outputs a Map. class MyMapFactory { List<IRemoteServiceProvider> providers; public Map buildMap() { //build Map of urls to http handlers here. // if the map wraps the list directory it can possibly even be dynamic! Depending on // whether SimpleHttpServerFactoryBean clones the map or uses it directly. } } <bean class="MyMapFactory" id="myMapFactory"/> <bean id="httpServer" class="org.springframework.remoting.support.SimpleHttpServerFactoryBean"> <property name="contexts"> <bean factory-bean="myMapFactory" factory-method="buildMap" class="java.util.Map"/> </property> <property name="port" value="8081" /> </bean&g

Categories : Java

Why would installing Azure SDK 2.1 or powershell 3 on the build server break some of our tests which run in powershell?
Have you tried passing a fully qualified path to startInfo.FileName instead of just Powershell.exe incase there's a problem with %PATH% since the update Complete total guess, but any chance your running into FileSystemRedirector 32 vs. 64 issues as seen in this answer - Process.Start(): The system cannot find the file specified, but my file path seems to be legit

Categories : Powershell

Executing Powershell script as different User in Exchange 2007 Powershell
I just found out that executing Remote Powershell Commands/Skripts is not supported with Exchange 2007 (http://howexchangeworks.com/2009/11/exchange-2007-sp2-supports-powershell.html). So I need to wait until the upgrade to 2013. Some workarounds: http://social.technet.microsoft.com/Forums/en-US/exchangesvrgeneral/thread/4596035a-cede-4541-8b8e-e2e9bf1b40dc Or: http://peerfect.blogspot.co.at/2012/10/re-blog-of-my-exchange-remote.html

Categories : Powershell

Add Powershell Snapin for Powershell Module and Import Multiple Times
You might want to try to specify this module required by your own module through a module manifest (.psd1). See RequiredModules here.

Categories : Powershell

PowerShell Community Extensions not Recognized by TeamCity PowerShell Runner
Do you import the PSCX module in your script? PowerShell v3 will cache the module info after you have done this once so you don't need to import it again. However if TeamCity is running the 64-bit console and you normally run the 32-bit console, then the 64-bit console wouldn't have PSCX commands in the command cache. Anyway, it is a good practice to have your scripts explicitly require the modules it depends upon e.g. #requires -Modules Pscx

Categories : Powershell



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.