With Bozteck VENM, you have the ability to run your own PowerShell scripts remotely on PC’s connected to your network. This article will explain how to accomplish this easily.
The remote computers must have WinRM enabled in order to run PowerShell scripts from remotely. If you do not have WinRM enabled and attempt to run a script against that PC, you will encounter the error message in Figure 1.
Figure 1 – WinRM error
To correct this error, you will need to run the following command on the remote PC before it is able to accept remote PowerShell Scripts:
If you have a large number of computers to do this for, you can use VENM to run this as a CMD script. Simply follow the same steps that you see here for running PowerShell scripts except for the script type, choose CMD and use the command above.
How It Works
1. Begin by opening the script editor.
2. Name your script and put your PowerShell commands in the script window on the right. Optionally, you can set conditions for your script to only execute in certain environments.
You may also include files with your script which will be copied to c:\temp\vncscan on the remote computer( s ) prior to execution.
3. Back at the main console window, select your script from the dropdown in the task panel shown below.
4. Select one or more computers from the list and press the “Execute” button.
You can run many script types this way including Windows batch scripts, KiXScript. VB Script, and more.
The ability to run these scripts remotely is typically an enterprise feature in management suites costing many thousands of dollars. Bozteck VENM allows you to do this easily for almost nothing.
The other day, I was hanging out in the datacenter with a friend who has a long history of teaching Microsoft certification courses at New Horizons and the subject of monitoring classroom screens came up. He said that he wishes he had VNCScan in the past so that he could monitor the classroom desktops to tell how far students are in their labs or if they were grasping what he was teaching.
He stressed that he had been using VNCScan for a while and didn’t even know of this priceless feature so I absolutely must spotlight it in a blog post. I couldn’t agree more so here it is.
VNCScan can capture the screen of remote computers without the reliance on VNC or any other client software on the remote computers. We use a patented method of snapping and returning the screenshots in a way that is extremely lightweight The process does not disturb the desktop in any way and the tool does not stay resident on the PC once the capture session has completed.
- Make sure that you have provided an Administrative login and password in the Security/Identity portion of the main program preferences
- Ensure that no desktop firewalls are blocking Windows file sharing and remote registry access
- Windows 8 and Server 2012 may need to have the .Net 2.0 Framework feature enabled on the remote computers. (how-to)
This video shows you how to share your VNCScan data with your co-workers. I also touch on the new data import tool.
We get many requests for command line options that can be used with the UltraVNC viewer that is shipped as the default in VNCScan. You can find all of them right here.
You can use these command line options to take advantage of features that are not settable via the GUI in VNCScan. Here’s how:
- Open the main program preferences from the toolbar
- Select the “Support Files” section
- Add your command lines in the textbox designated for the switches
You can get your own copy of VNCScan at http://www.bozteck.com/vncscan
One of our users has created a website to share his scripts. There are some really useful ones up there so it may be worth your time to browse them.
You can use these scripts in VNCscan to remotely manage your computers. Here’s how:
- From the main menu, click Tools
- Click “Scripting and Commands”
- Click “Remote Script Manager”
- Click on the “New Script” button
- Give the script a name
- Paste the script into the big textbox under the word “Variables”
- Edit the script to meet your needs
- Include any files that your script will call for
- Save and close the script
You can execute that script on a remote computer by:
- Select a computer or computers in a managed group
- From the Managed Groups toolbar, choose “Remote Scripts”
- Select your script from the dropdown
Adobe Flash Player has been the target of many security attacks lately due to its inherent security flaws. Adobe updates the Flash player frequently.
It’s very difficult to get all of the systems on your network updated because it requires Administrator permissions to apply the updates. There aren’t any inexpensive tools for pushing these updates out so I will show you how to do this using Bozteck VNCScan.
Here are the steps in a nutshell:
- Download the flash player distribution from here
- Create the script in the Script Manager
- Add the flash install file to the script window
- Ensure that you have access permissions to the remote computer(s)
- Select the computers that you’d like to deploy the script to
- Select the script from the dropdown
- Watch it work
Downloading Flash Player
You can download the scriptable Flash player from http://www.adobe.com/products/flashplayer/fp_distribution3.html. For this tutorial, we’re going to download the Internet Explorer executable.
Create the script
Open the script manager using the Tools => "Scripts and Commands” menu as shown below:
From the window below, choose “New Script”
In the new script window,enter the script title and optionally a folder to group it in as well as any notes on the deployment and then choose to include a file.
Browse to the install_flash_player_10_active_x.exe file that you downloaded to choose it. You will see the path to the file below:
When the script is executed on the remote computer, the path to the included file will be %systemdrive%\temp\vncscan\install_flash_player_10_active_x.exe. Any files that you attach to script this way are always stored there. You’ll need to reference that location by using that in the path of the file that you’re calling. See the screen shot below:
Choose “Save and Close” to return back to the main window.
Deploy the script
We need to start by ensuring that the administrative access to the remote computer has been set. One way to do this on a per-computer basis is to right-click the computer and choose properties; and then flip to the “Windows Login” tab. Enter the Administrator username and password that is valid on the remote computer. If you’re not on a domain, just leave the domain field at %HOST%.
Now, select the computer in the Managed List. Now, click on the “Remote Scripts” and choose your new script.
The window below will pop up and the software will be deployed:
Keeping Up to Date
You can keep this script up to date easily because Adobe always names the file the same every time. Simply return to the website and download the latest version, remove the one in the script, and then add this new download. Simply re-deploy and you’re up to date!
This guide will describe the procedures and various options when deploying VNC on your network to Windows XP, Windows 7, and Windows Server using the tools in VNCScan Enterprise Network Manager (VENM). We’ll move through each of the screens and give an overview of each of the settings and what they do. We’ll conclude with a look at what happens during the deployment process behind the scenes.
System Requirements for VNC Push Installs
· The remote computer must be running Windows 2000 or greater
· The Remote Registry must be started on the remote computer (in some configurations, this is disabled by default and needs to be set to “Automatic”)
· In Windows XP, Simple File Sharing needs to be disabled.
· There must be no firewall enabled that is blocking the typical file sharing ports.
· Administrator access to remote computers must be either granted to the account you are logged in as or supplied in the deployment tool at the time of deployment.
VNCScan uses the concept of “Deployment Profiles” to group settings for the remote server. Instead of choosing options such as the server password, VNC version, and various other settings every time that you deploy VNC, you can create names profiles that contain all of this information; ready to be used on any computer on your network quickly.
These profiles are created using the Profile Editor. The easiest way to get to this tool is the toolbar under the Managed Groups tab (Fig 1.0)
The Profile Editor
Using the Profile Editor, you can create new profiles or edit existing ones. We’ll start by creating a new profile called “UltraVNC with MS Login”. To start, click on the button that says “New Profile” as seen below.
Let’s take a moment to look at all of the options on the first tab of the deployment profile editor in the image below (FIG 1.2).
· Profile Name – This is what will be used to reference this profile when it’s time to deploy VNC Remote Screen Sharing to a networked computer.
· VNC Version – You have the option of deploying 4 different versions of VNC; UltraVNC, TightVNC, RealVNC Freeware, or UltraVNC Legacy. UltraVNC is the default and most compatible with modern operating systems. This is the official version that is best supported in VNCScan.
· The server password must always be set no matter what other settings you choose in the editor.
· The TightVNC Read-Only password will be enabled if you are deploying TightVNC and wish to enable a second password for read-only access to the remote desktop.
· VNC Port – this is the port that VNC will listen on for a connection. If you alter this, you will need to make sure to edit the computer or group properties in VNCScan to connect on the correct port.
· Java Port – optionally, VNC Server has a built in java web client. If you set the port to 0 it will disable this server.
The connection options are optional and work fine as the defaults for most scenarios. If you’d like to modify them, here’s what they do:
· Authorized Host Connections – this allows you to say who can or cannot establish a connection to the remote server based upon IP address. You can get more information about the AuthHosts here,
· Disconnect Actions allow you to do certain actions on the remote computer upon disconnect such as log off or lock the workstation
· When checked, you can make the server ask the logged on user for permission before connecting.
· The next checkbox compliments the one mentioned above by automatically accepting the connection if the logged on user doesn’t respond after x number of seconds.
· For performance reasons, you can also choose to remove the remote desktop wallpaper, pattern, or user interface effects while remotely connected.
There are additional performance options listed below. Things operate fine at their defaults. Changing them can get a bit more geeky and should be done with care.
· Use VNC Hooks… – That will use “hooks” into the operating system to detect which areas of the screen has changed and need to be updated in the viewer. This just gives a little better quality with screen updates. The downside is the increase of CPU required at the remote computer.
· Poll the whole screen – this will poll the entire screen for updates on each cycle instead of just the foreground window(s). As expected, it can cause a performance hit on the remote computer.
· Filter Events that have no effect – This filters out changes on the remote system that aren’t visible on the monitor. I’d leave that checked unless there’s a specific need to uncheck it.
· Sharing – This determines at the server level what happens if two different consoles attempt to remote control the desktop at the same time.
o Always Shared – no matter what setting the connected client(s) have set, the server will override them and allow the desktop to be shared by all connections
o Never share – no matter what setting the connected client(s) have set, the server will override them and disallow the desktop to be shared by all connections
o Use Client Defaults – This lets the client settings decide. If the connecting client is set to disallow sharing, all existing connections will be dropped in favor of the newly connecting client.
· Accept Pointer Events – to accept mouse input from the connected clients or not
· Accept Keyboard Events – to accept keyboard input from the connected clients or not
· Accept clipboard Updates – When checked, anything copied to and from the clipboard at either computer is passed through the VNC connection to the remote computer. If this is enabled, be careful of what you copy into the clipboard while in a VNC session.
· Send Clipboard Updates – this controls whether anything copied to the clipboard on the server is sent back to the client’s clipboard for pasting.
· Clipboard events affect the screen saver – If enabled, the screen saver will be disrupted on the server if the client copies something to their clipbard
· Disable local inputs – This will disable the remote servers keyboard and mouse while someone is connected to the server.
Here’s where we can set some things that are specific to UltraVNC along with other settings that you may be interested in.
· Disable Tray Icon – This hides the VNC icon on the remote computer. Normally, while the service is running, there’s a little icon by the clock that gives information about the server and allows users to change settings. Hiding the icon can take away the temptation to tamper.
· Allow users to shut down VNC – When this is checked and the user right-clicks the icon in the task bar for the server mentioned above, the option to shut down the server will be grayed out.
· Allow users to change and access settings – When this is checked and the user right-clicks the icon in the task bar for the server mentioned above, the option to open the settings window for the server will be grayed out.
· Use DSM Encryption – This is specific to UltraVNC. It enables encryption for the IP traffic between the server and the viewer. This happens using a shared private key file. If the server is deployed with this check box checked, it will refuse connections from any viewer that is not configured for encryption with the same private key. More information on this is here.
· MS Authentication – This is also specific to ULtraVNC. It will ignore the password configured in the “Required Settings” tab and use Windows authentication to control the connection instead. The ACL lingo is explained here.
The custom section of the profile editor is getting a little out dated. In older versions of VNC, settings were stored in the registry. Now they are most stored in a file in the same folder as the server. If you’re still deploying older registry based VNC versions, this section could come in handy to you.
You can add custom registry keys to the remote computer during the deployment using this screen. If you chose UltraVNC DSM encryption in the previous tab, a path will be specified here to the rc4.key private key file that will be used on the server end. If you’ve created your own key, be sure that the same key file is in the folder where your vncviewer.exe is located. Again, more information on this can be found here.
That’s it! Save your settings and you’re ready to deploy it to a workstation.
Deploying the Profile
We’re going to start with the premise that the computer you are wishing to deploy VNC remote desktop to is not already added to a group in your console. We’ll start by right-clicking a group and choosing to register a new computer manually.
Now, type in the workstation name, then hit the button that says “Resolve From HostName”
You can optionally enter any other information in this dialog but this is all that is required to continue. Press the OK button to return to the main window.
Click the “VNC Deployment” toolbar and select “Deploy to Selected”
The following window is displayed (FIG 2.4). Let’s go over some of the options that you see here.
· Selected Computers – these are the computers selected to have VNC deployed to
· Deploy Profile – this is the profile of settings to be applied to the selected computers once VNC has been pushed to them. Look familiar?
· Add computers to group – Once the push process has been initiated, the computer(s) will be added to the group selected
· Use alternative login credentials – This will be the user account used to access the remote computer and its registry. Make sure that it’s a user account with administrative access to each computer in the selected computers list.
· Do not copy start menu icons – this prevents the icons for VNC server from showing up on the remote computer’s start menu
· Deploy UltraVNC video driver – When checked, the push script will attempt to install the UltraVNC performance enhancing video driver on the remote system. Be aware that Windows Vista, 7, and server 2008 have driver signing restrictions that may cause a prompt to show up on the remote computer during deployment.
You’re done! If everything went right, you should be able to connect to the remote computer and remote control it by simply double-clicking on the computer in the main window.
The recent changes in VNCScan has revealed some confusion regarding the data files, their locations, and what they all do. For a historical primer, you may want to start with this blog post.
Key Data Folders
The data files are stored in three key folders;
- Data – Stores all of your program settings, group settings, and computer settings.
- Jobs – Stores all of your remote scripts. Each script job has a subfolder named after that job. That subfolder contains all of the files required to push and execute that job on a remote computer.
- Profiles – Stores all of your VNC deployment profiles. Each deployment profile gets a subfolder named after it.
- The Root
- All three of these key folders must be stored with in the same Root folder. By default, the Root folder is “My Documents\VNCScan”.
- The first time that VNCScan runs, it checks the registry key “HKEY_CURRENT_USER\Software\VNCScan\SettingsDataPath” for the path to the root location.
- If that registry key holds no data or if the path doesn’t exist, it will create the required folders at the default location and start fresh with new data.
- The Key Files
Both of the following files must reside in the Data folder:
· Settings.xml – This file holds all of the initial settings for the console. This file stores anything that is global to the application.
· Groups.xml – This holds all of your group names along with their settings. You will find XML files in the same folder named after the group names, also. These files hold the computers and their settings.
Learn how to remotely enable RDP Terminal Services on remote computers using VNCScan!
We’ve had a lot of request for the ability to automatically reconnect to computers when they are rebooted. A majority of the requests were resolved with the implementation of the background scanner and the actions that can be performed when the scanner detects that the computer is alive.
To take this a step further, we’ve modified the ping window that happens when you right-click a computer and choose “Ping Computer”. Instead of just opening a command window with the standard ping command running, we’ve designed our own. We’ve done this in order to bring you an exciting new feature – automatically running commands or connecting when a computer responds for X number of consecutive pings.
Here’s a quick video showing how: http://screencast.com/t/CqJI7YhE