phrozenio / powerremotedesktop Goto Github PK
View Code? Open in Web Editor NEWRemote Desktop entirely coded in PowerShell.
Home Page: https://www.phrozen.io
License: Apache License 2.0
Remote Desktop entirely coded in PowerShell.
Home Page: https://www.phrozen.io
License: Apache License 2.0
Can something like this be implement in this amazing tool?
Thanks your masterwork firstly!
But I Encountered an Error. PRD(your work) server is starting and ready , but once client conn to server ,the connection will dead and noany error! And the client just show a little window with server(but done just a moment) !
thanks your reply!
Hey there,
I am guessing that this is my own fault, as I wanted to see if a Linux viewer to connect to a Windows server, but when I attempted to connect to the server (Win 10 pro running in a VM using PowerShell 7.3.0-preview-1) from my desktop Pop_OS 21.10 using PowerShell 7.2.1 I get the following:
❯ Invoke-RemoteDesktopViewer -ServerAddress "192.168.101.147" -ServerPort 2801 -Password "Mys3cUr3P@$$w3rD"
Power Remote Desktop - Version 1.0.3.beta.4
Jean-Pierre LESUEUR (@DarkCoderSc) ###
https://www.github.com/darkcodersc
https://www.phrozen.io
License: Apache License (Version 2.0, January 2004)
https://www.apache.org/licenses/
MethodInvocationException: Exception calling "SetProcessDPIAware" with "0" argument(s): "Value cannot be null. (Parameter 'path1')"
I am guessing that Linux is probably not supported? I wanted to report this, though, just in case. I checked to see if there were any parameters I might have missed for a dpi setting, but didn't see any when searching the readme for dpi, just news that hdpi was supported.
Thanks,
-MH
This project uses the Out-Null
cmdlet in several codes, but it should be changed to $null
assignment, because Out-Null
has a lower performance than $null
assignment, it is over 1000 times slower in Windows PowerShell 5.1.
In PowerShell 7.1, there is almost no difference because of the improvements, but $null
assignment is still faster.
$Buffer = New-Object byte[] 4096
# Out-Null
Measure-Command {(1..1000).ForEach({$Buffer | Out-Null})} | select TotalMilliSeconds
TotalMilliseconds
-----------------
8050.2508
# $null assignment
Measure-Command {(1..1000).ForEach({$null = $Buffer})} | select TotalMilliSeconds
TotalMilliseconds
-----------------
6.1887
Can anyone make this Project Remote Desktop RDP run on my pc without any errors and in running condition, I will also pay his charges to run this software and if anyone can do that then kindly contact me at this email: [email protected]. Visual Studio 2022 in Windows 10
Hello, instruction say to use the ratio option to increase screen size at max of 99, but i can't resize to full screen ( usefull if the client resolution pc and the server PC have different resolution, because if the resolution Is different, also at 99 the screen size Is small). Is possibile to enlarge to full screen or is possibile to add this feature ?
Hello,
Thanks for the wonderful ps script., I'm able to establish connections b/w server and viewer. But on Viewer screen is blank after the connection is established.
Is any tweak needed on my side in the script.
Advice pls.
Thank you,
Satheesh360
Hello!
I've just installed this module and try to test on the localhost.
When I run Invoke-RemoteDesktopViewer -ServerAddress "127.0.0.1" -ServerPort 2801 -SecurePassword (ConvertTo-SecureString -String "urCompl3xP@ssw0rd" -AsPlainText -Force) in the example,
I have encountered Exception: Could not open a new session with error: "Exception calling ".ctor" with "2" argument(s): target computer denied access"
Anything that I should look for to solve issue?
OS: Windows 10
Thanks.
Hello @DarkCoderSc ,
I'm trying to run PowerRemoteDesktop_Server module on Windows 10 (1909) and Windows Server 2016, both have powershell 5.1 but I encounter an issue when I run :
Invoke-RemoteDesktopServer -ListenAddress "0.0.0.0" -ListenPort 2801 -SecurePassword (ConvertTo-SecureString -String "P@ssw0rd!2022" -AsPlainText -Force)
Power Remote Desktop Server- Version 4.0.0
Jean-Pierre LESUEUR (@DarkCoderSc) ###
https://www.github.com/darkcodersc
https://www.phrozen.io
License: Apache License (Version 2.0, January 2004)
https://www.apache.org/licenses/
Loading remote desktop server components...
VERBOSE: Initialize new session manager...
VERBOSE: Custom X509 Certificate not specified.
VERBOSE: Generate and Install a new local X509 Certificate.
VERBOSE: Certificate was successfully installed on local machine. Opening...
VERBOSE: @Certificate:
VERBOSE: [Subject]
CN=PowerRemoteDesktop.Server, O=Phrozen, L=Maisons Laffitte, S=Yvelines, C=FR, OU=Freeware
[Issuer]
CN=PowerRemoteDesktop.Server, O=Phrozen, L=Maisons Laffitte, S=Yvelines, C=FR, OU=Freeware
[Serial Number]
128F02D94D36849B471C1963CAC549D2
[Not Before]
4/10/2022 1:54:43 PM
[Not After]
4/11/2023 1:54:43 PM
[Thumbprint]
2819E5C755CCFA6302743B994719D9AE24EF1DBE
VERBOSE: ---
VERBOSE: Session manager initialized.
Remote desktop was closed.
New-Object : Cannot find type [TcpListenerEx]: verify that the assembly containing this type is loaded.
At line:32 char:18
+ return @(& $origNewObject @psBoundParameters)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
Many thanks for this tool and for your support!
Problems after the target host is remote desktop
Dear Developer Hello!
It's a pleasure to try your open source project, I have some problems after using it, here is my advice:
Additional Issues: Frame Delay and File Delivery
Can the screen lag be improved? (I tried reducing ImageCompressionQuality to 30%, still lag)
Can file transfer be done through the clipboard?
Looking forward to your reply, thank you!
(maybe there is something semantically wrong because I used a translator)
total noob here but im testing this out on 2 machines both on my local network and when running the invoke-remotedesktopviewer command the said error comes up. not sure where to go from here. fyi the machine with the server is port forewarded with the same port im trying to use
heres the output of the veiwer
Power Remote Desktop - Version 4.0.0
Jean-Pierre LESUEUR (@DarkCoderSc) ###
https://www.github.com/darkcodersc
https://www.phrozen.io
License: Apache License (Version 2.0, January 2004)
https://www.apache.org/licenses/
VERBOSE: Server address: "127.0.0.1:2801"
Start new remote desktop session...
VERBOSE: Request new session with remote server: "127.0.0.1:2801"...
VERBOSE: Establish first contact with remote server...
VERBOSE: Connect: "127.0.0.1:2801..."
VERBOSE: Close existing session...
VERBOSE: Session closed.
VERBOSE: Free environement.
VERBOSE: Close existing session...
VERBOSE: Session closed.
VERBOSE: Free runspaces...
Remote desktop session has ended.
Exception:
Line |
1004 | throw "Could not open a new session with error: ""$($_)"" …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not open a new session with error: "Exception calling ".ctor" with "2" argument(s): "No connection could be made because the target machine actively refused it. [::ffff:127.0.0.1]:2801""
Hi! Just a quick message (sorry to raise an issue).
I'm not much of a coder so take this with a grain of salt but...
You work is some of the best Powershell I've ever seen including the open source stuff from Microsoft.
Easy To Understand, Explicit, Easy To Follow
Just want to say thank you for your work and please keep it up!
There appears to be a problem with the algorithm for password generation using Get-Random
used in several places in the project.
For example, the following code seems to expect to generate a random string of 128 characters, but in fact it generates a string of only 94 characters.
Furthermore, it is not completely random, since the same character can never appear more than once in the string.
# This code generates only 94-digit string and same character never appears more than once
$candidate = (-join ((33..126) | Get-Random -Count 128 | ForEach-Object{[char] $_}))
$candidate.Length # -> 94
If you want to fix this algorithm, I suggest the following code. I will submit a PR for the dev branch if you request it.
# This code generates fully random 128 characters string
-join ((1..128) | ForEach-Object {Get-Random -input ([char[]](33..126))})
I don't fully understand the intent of the code, so if this is the intended behavior rather than a bug, please ignore it.
In the readme Invoke-RemoteDesktopServer should be Invoke-RemoteDesktopViewer.
What add-ons do I need to install so that this script also works on windows 7?
I'm running it with the command:
Invoke-Expression (Get-Content .\PowerRemoteDesktop_Server.psm1 -Raw)
I get the error:
Get-Content : Cannot find a parameter that matches the parameter name "Raw".
line:1 character:69
+ Invoke-Expression (Get-Content .\PowerRemoteDesktop_Server.psm1 -Raw <<<< )
+ CategoryInfo : InvalidArgument: (:) [Get-Content], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetContentCommand
As title, if this tool able to pass the sound of the system? Maybe it needs something like a virtual sound card installed if the machine has no equipment.
And thanks for this amazing tool!
System: Windows 11, admin powershell.
PS C:\WINDOWS\system32> Invoke-RemoteDesktopServer
Invoke-RemoteDesktopServer : The command "Invoke-RemoteDesktopServer" was found in the module "PowerRemoteDesktop_Server," but the module could not be loaded. If you want more information, run "Import-Module PowerRemoteDesktop_Server."
At line:1 char:1
+ Invoke-RemoteDesktopServer
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Invoke-RemoteDesktopServer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
PS C:\WINDOWS\system32> Import-Module PowerRemoteDesktop_Server.
Import-Module : The specified module "PowerRemoteDesktop_Server." was not loaded because a valid module file was not found in any module directory.
At line:1 char:1
+ Import-Module PowerRemoteDesktop_Server.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (PowerRemoteDesktop_Server.:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Keystrokes with open brackets (
, [
, {
are not being sent to the remote session.
It does not occur with close brackets.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.