Code Monkey home page Code Monkey logo

wayknow-ps's Introduction

Wayk Now PowerShell Cmdlet

Installation

On Windows, the regular PowerShell can be used. On macOS and Linux, you need PowerShell Core 6.0:

To launch a PowerShell Core terminal, use the pwsh command.

Installation from PSGallery

The Wayk Den PowerShell module is available on PSGallery.

Install-Module -Name WaykNow
Import-Module WaykNow

If you encounter issues with the Install-Module command, you may have to install or update PowerShellGet.

You can then list all commands exported from the WaykNow module:

Get-Command -Module WaykNow

Installation from Source

From PowerShell, clone the WaykNow-ps git repository, then import the module from the "WaykNow" directory.

git clone https://github.com/Devolutions/WaykNow-ps
Import-Module "./WaykNow-ps/WaykNow" -Force

Usage

Install/Uninstall

The Install-WaykNow and Uninstall-WaykNow commands can be used to install, update and uninstall Wayk Now on all platforms. On Windows, the PowerShell console must have elevated rights to perform the installation. On macOS and Linux, sudo will be called to elevate permissions when necessary.

Here is a sample installation, update check and uninstall for macOS:

PS ~/WaykNow-ps> Install-WaykNow
Installing Wayk Now 3.3.2
Downloading https://cdn.devolutions.net/download/Mac/Wayk/3.3.2.0/Wayk.Mac.3.3.2.0.dmg
Password:
PS ~/WaykNow-ps> Install-WaykNow
Wayk Now is already up to date
PS ~/WaykNow-ps> Uninstall-WaykNow

By default, the Install-WaykNow skips the installation if the local Wayk Now version is the same as the latest one available, unless the -Force parameter is used.

The -Version optional parameter can be used to force using a specific version of Wayk Now instead of the latest one.

Version/Package

The Get-WaykNowVersion command detects the current Wayk Now installation version number.

PS ~/WaykNow-ps> Get-WaykNowVersion
3.3.2

The Get-WaykNowPackage command discovers the latest Wayk Now version available and the corresponding download URL.

An optional parameter -Version is available if you want to see an older version of Wayk Now.

PS ~/WaykNow-ps> Get-WaykNowPackage

Url                                                                        Version
---                                                                        -------
https://cdn.devolutions.net/download/Mac/Wayk/3.3.2.0/Wayk.Mac.3.3.2.0.dmg 3.3.2

Start/Stop/Restart

The Start-WaykNow, Stop-WaykNow and Restart-WaykNow commands can be used to start, stop and restart all Wayk Now executables and services correctly. This can be particularly useful with the Windows system service.

Reboot in Safe Mode

This is an experimental feature for Windows that has been prototyped as part of this PowerShell cmdlet. It will likely be rewritten and integrated directly in the main Wayk Now software at some point in the future.

Starting from a regular Windows boot environment (not safe mode), open an administrative PowerShell console and use the Set-WaykNowSafeMode command. This will create a copy of the current boot entry, rename it to "Wayk Now Safe Mode", and set it as the default. A copy of the original boot entry name is saved in the registry to allow reverting to the original state.

You can not reboot the system (Restart-Computer or shutdown /r), and it will automatically select the "Wayk Now Safe Mode" boot entry. Once the system is booted, you should be able to connect to it with Wayk Now.

To revert to the original state, open a PowerShell console again, but use the Reset-WaykNowSafeMode command. This will set the original boot entry as the default, and delete the special "Wayk Now Safe Mode". You can now restart the computer again and it will boot in its regular state.

Wayk Now Information

The Get-WaykNowInfo command returns information about the differents WaykNow paths

PS ~/WaykNow-ps> Get-WaykNowInfo
DataPath        : C:/Users/User/AppData/Roaming/Wayk
GlobalDataPath  : C:/ProgramData/Wayk/WaykNow.cfg
ConfigFile      : C:/Users/User/AppData/Roaming/Wayk/WaykNow.cfg
LogPath         : C:/Users/User/AppData/Roaming/Wayk/logs
CertificateFile : C:/Users/User/AppData/Roaming/Wayk/WaykNow.crt
PrivateKeyFile  : C:/Users/User/AppData/Roaming/Wayk/WaykNow.key
PasswordVault   : C:/Users/User/AppData/Roaming/Wayk/WaykNow.vault
KnownHostsFile  : C:/Users/User/AppData/Roaming/Wayk/known_hosts
BookmarksFile   : C:/Users/User/AppData/Roaming/Wayk/bookmarks

Configuration

The Set-WaykNowConfig command, is used for modfy multiple settings from WaykNow. Here is a list of properties that you can modify:

With Windows you can set the global settings or the local settings, by default the local setting is used, if you want to use the global settings in you command add this flag:

PS ~/WaykNow-ps> Set-WaykNowConfig -Global

Get Configuration

The Get-WaykNowConfig command returns the list of configurations from WaykNow

PS ~/WaykNow-ps>  Get-WaykNowConfig
FriendlyName               : david
Language                   : en
ControlMode                : AllowRemoteControlSeverOnly
AutoLaunchOnUserLogon      : False
ShowMainWindowOnLaunch     : True
MinimizeToNotificationArea : False
ElevationPrompt            : False
AllowPersonalPassword      : True
AllowSystemAuth            : True
AllowNoPassword            : True
PersonalPasswordType       : Generated
PersonalPassword           : 52gk8z
GeneratedPasswordLength    : 6
GeneratedPasswordCharSet   : Alphanumeric
DenEnabled                 : True
DenUrl                     : wss://den.wayk.net
QualityMode                : High
LoggingLevel               : Off
LoggingFilter              :
AccessControlViewing       : Disable
AccessControlInteract      : Confirm
AccessControlClipboard     : Disable
AccessControlFileTransfer  : Confirm
AccessControlExec          : Allow
AccessControlChat          : Allow

General Properties

FriendlyName

The Friendly Name is used for Prompt For Permission (PFP) authentication. It should be easily recognized by your peers.

Type: string
DefaultValue: Username of the local user
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -FriendlyName david

Language

Specifies the language of the application, "en" for English, "fr" for French, "de" German, "zh-CN" for Chinese Simplified, "zh-TW" for Chinese Traditional.

Type: string
DefaultValue: Language of the system
Accepted values: "en", "fr", "de", "zh-CN", "zh-TW"
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -Language en

ControlMode

Specifies the Remote Control Mode of WaykNow, AllRemoteControlMode: Both sides are displayed, TakeRemoteControlClientOnly: Only the client side is displayed and AllowRemoteControlSeverOnly: Only the server side is displayed.

Type: ControlMode
DefaultValue: AllRemoteControlMode
Accepted values: AllRemoteControlMode, TakeRemoteControlClientOnly, AllowRemoteControlSeverOnly
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -ControlMode AllRemoteControlMode

AutoLaunchOnUserLogon

Select this option if you wish to launch Wayk Now when you log on.

Type: boolean
DefaultValue: false
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AutoLaunchOnUserLogon false

ShowMainWindowOnLaunch

this option is to prevent the main application window from showing when Wayk Now starts. It can be quite useful when the application is automatically launched.

Type: boolean
DefaultValue: true
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -ShowMainWindowOnLaunch true

MinimizeToNotificationArea

This option is to hide Wayk Now from the taskbar when minimized.

Type: boolean
DefaultValue: false
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -MinimizeToNotificationArea false

ElevationPrompt

This option is to disable the prompt to elevate program permissions, and run Wayk Now without elevated program permissions.

Type: boolean
DefaultValue: false
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -ElevationPrompt false

Security Properties

AllowPersonalPassword

Setting to enabled/disabled SRP: When Secure Remote Password is disabled, the password options are disabled as well.

Type: boolean
DefaultValue: true
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AllowPersonalPassword true

AllowSystemAuth

Setting to enabled/disabled SRD: Secure Remote Delegation is the method used for system authentication in the case of unattended remote access. On Windows, remote access is restricted to members of the built-in Administrators or Remote Desktop Users groups.

Type: boolean
DefaultValue: true
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AllowSystemAuth true

AllowNoPassword

Setting to enabled/disabled PFP: Prompt for Permission authentication requests explicit consent from the remote user without the need for a password.

Type: boolean
DefaultValue: true
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AllowNoPassword true

PersonalPasswordType

Setting to select your password type:

  • Generated Password
    Generate a strong, random password with our password generator which can be configured with the -GeneratedPasswordLength and -GeneratedPasswordCharSet section.

  • Custom Password
    Create a custom password of your own choosing.

Type: PersonalPasswordType
Accepted values: Generated, Custom
DefaultValue: Generated
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -PersonalPasswordType Generated

PersonalPassword

Create a custom password of your own choosing.

Type: string
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -PersonalPassword password

GeneratedPasswordLength

The generated password length

Type: int
Accepted values: Between 3 and 9
DefaultValue: 6
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -GeneratedPasswordLength 6

GeneratedPasswordCharSet

The parameter used by the password generator: The alphanumeric character set contains numbers and letters, excluding 0, O, 1, I for a total of 32 characters. This choice was made to avoid any possible confusion when communicating the password to the other user.

Type: GeneratedPasswordCharSet
Accepted values: Numeric, Alphanumeric
DefaultValue: Alphanumeric
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -GeneratedPasswordCharSet Alphanumeric

Connectivity Properties

DenEnabled

Connect to Wayk Den to enable simplified peer-to-peer connectivity with a 6-digit ID.

Type: boolean
DefaultValue: true
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -DenEnabled true

DenUrl

Connect to the Wayk Den server with the URL

Type: string
DefaultValue: "wss://den.wayk.net"
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -DenUrl wss://den.wayk.net

Advanced Properties

QualityMode

The quality mode allow to adjust the quality of the render to optimize performance.

Type: QualityMode
Accepted values: Low, Medium, High
DefaultValue: Medium
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -QualityMode Medium

LoggingLevel

This Logging level option affects the verbosity of the logging messages.

Type: LoggingLevel
Accepted values: Trace, Debug, Info, Warn, Error, Fatal, Off
DefaultValue: Off
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -LoggingLevel Off

LoggingFilter

This Logging filter option filters the types of messages that are logged. Do not use unless instructed.

Type: string
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -LoggingFilter filter

Access Control Properties

The Access Control section allows you to restrict access to certain resources shared by the server. In other words, access control defines what can be done to your machine when someone else is connected. You can set each feature independently.

  • Allow: The feature is enabled.

  • Confirm: The feature is disabled, but can be enabled after user confirmation during the session.

  • Disable: The feature is disabled. For security reasons or to enforce company policies, you may want to disable specific features.

AccessControlViewing

The viewing access control

Type: AccessControl
Accepted values: Allow, Confirm, Disable
DefaultValue: Allow
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AccessControlViewing Allow

AccessControlInteract

The interaction access control

Type: AccessControl
Accepted values: Allow, Confirm, Disable
DefaultValue: Allow
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AccessControlInteract Allow

AccessControlClipboard

The clipboard access control

Type: AccessControl
Accepted values: Allow, Confirm, Disable
DefaultValue: Allow
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AccessControlClipboard Allow

AccessControlFileTransfer

The file transfer access control

Type: AccessControl
Accepted values: Allow, Confirm, Disable
DefaultValue: Allow
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AccessControlFileTransfer Allow

AccessControlExec

The execution access control

Type: AccessControl
Accepted values: Allow, Confirm, Disable
DefaultValue: Allow
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AccessControlExec Allow

AccessControlChat

The chat access control

Type: AccessControl
Accepted values: Allow, Confirm, Disable
DefaultValue: Allow
Example:

PS ~/WaykNow-ps> Set-WaykNowConfig -AccessControlChat Allow

White Labeling

Branding Management

Test Wayk Now Branding

The Test-WaykNowBranding command with the parameter BrandingPath will inform you if the branding.7z is in a correct format, if the json file is correct, and if the encoding of the json file is correct.

PS ~/WaykNow-ps> Test-WaykNowBranding -BrandingPath https://cdn.devolutions.net/download/Documents/help-content/branding.7z
PS ~/WaykNow-ps> Test-WaykNowBranding -BrandingPath C:\Devolutions\BrandingFolder\branding.7z

Set Wayk Now Branding

The Set-WaykNowBranding command with the parameter BrandingPath will copy your archive branding.7z to the correct path of WaykNow, you can use an url, or a local path. The Sample flag downloads and installs a sample branding.7z file for a fictional company that you can use as a reference or starting point.

PS ~/WaykNow-ps> Set-WaykNowBranding -BrandingPath https://cdn.devolutions.net/download/Documents/help-content/branding.7z
PS ~/WaykNow-ps> Set-WaykNowBranding -BrandingPath C:\Devolutions\BrandingFolder\branding.7z
PS ~/WaykNow-ps> Set-WaykNowBranding -Sample

Reset Wayk Now Branding

The Reset-WaykNowBranding command remove the branding.7z from the %APPDATA%\Wayk and the %PROGRAMDATA%\Wayk paths.

Wayk Now License

Set Wayk Now License

The Set-WaykNowLicense command with the parameter License, sets your Wayk Now license.

PS ~/WaykNow-ps> Set-WaykNowLicense -License XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Get Wayk Now License

The Get-WaykNowLicense command returns your license from Wayk Now.

PS ~/WaykNow-ps> Get-WaykNowLicense
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Reset Wayk Now license

The Reset-WaykNowLicense command removes your license from Wayk Now.

PS ~/WaykNow-ps> Reset-WaykNowLicense

Wayk Now Unique ID

Get Wayk Now Unique ID

The Get-WaykNowUniqueID command returns the unique ID of Wayk Now

PS ~/WaykNow-ps> Get-WaykNowUniqueID
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Connection with Wayk Den

Connect WaykNowDen

The command Connect-WaykNowDen will start a connection to the WaykDen set on WaykNow, you can use the parameter -Force to force reconnect the actual session.

PS ~/WaykNow-ps> Connect-WaykNowDen
"name" is now connected

Disconnect WaykNowDen

The command Disconnect-WaykNowDen will logout your connection with WaykDen.

PS ~/WaykNow-ps> Disconnect-WaykNowDen

Get WaykNowDen

The command Get-WaykNowDen show the WaykDen set on WaykNow

PS ~/WaykNow-ps> Get-WaykNowDen
DenUrl             Realm    DenID  DenPath
------             -----    -----  -------
wss://den.wayk.net wayk.net XXXXXX C:\Users\user\AppData\Roaming\Wayk\den\wayk.net

WaykNow Machine Management

To use this feature, WaykNow need to be installed on Windows with the unattended mode, you need to be connected to WaykDen (you can refer to "Connection with Wayk Den" section), and Powershell need to be run as administrator.

Register WaykNow Machine

The command Register-WaykNowMachine register your WaykNow client to WaykDen, with the unique ID of WaykNow.

PS ~/WaykNow-ps> Register-WaykNowMachine

Machine Registered: 4133d6bb-6eb6-be1a-30fd-f6be391d5aci

Unregister WaykNow Machine

The command Unregister-WaykNowMachine Unregister your WaykNow client to WaykDen, with the unique ID of WaykNow.

PS ~/WaykNow-ps> Unregister-WaykNowMachine

Get WaykNowMachine

The command Get-WaykNowMachine show the registered machine on your WaykDen. You need to be logged with WaykDen before use this command, you can refer to "Connect WaykNowDen"

PS ~/WaykNow-ps> Get-WaykNowDenMachine

MachineName     DenID  State   UserAgent
-----------     -----  -----   ---------
DEVOLUTIONS146W 616529 ONLINE  WaykNow/3.3.2 (Windows; Windows 10 Pro 1809)
DEVOLUTIONS147W 619181 OFFLINE WaykNow/3.3.2 (Windows; Windows 10 Pro 1809)

WaykNow Logs Management

Enable WaykNow Logs

The command Enable-WaykNowLog will enable the logs on WaykNow with the Logging Level Debug by default, you can choose this one with the parameter LoggingLevel and you can choose to restart WaykNow with the command -Restart, because the changes will only be applied after an application restart.

PS ~/WaykNow-ps> Enable-WaykNowLog -Restart -LoggingLevel Info

Disable WaykNow Logs

The command Disable-WaykNowLog will disable the logs on WaykNow, you can choose to restart WaykNow with the command -Restart, because the changes will only be applied after an application restart.

PS ~/WaykNow-ps> Disable-WaykNowLog -Restart

Export WaykNow Logs

The command Export-WaykNowLog will export the logs from WaykNow, you need to set the parameter -ExportPath to choose the destination of the logs

PS ~/WaykNow-ps> Export-WaykNowLog -ExportPath C:\Users\user\Desktop

Clear WaykNow Logs

The command Clear-WaykNowLog will clear the logs from WaykNow

PS ~/WaykNow-ps> Clear-WaykNowLog

wayknow-ps's People

Contributors

awakecoding avatar jdufaud avatar

Watchers

 avatar

Forkers

my1 cocoon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.