What's new

Disable the touch screen to use the pen

@vxm,
I had the same result as you did. I partially solved the problem by going into the Properties for each of the downloaded cmdlet files and clicked Unblock.
Now I get a different error:
upload_2015-5-24_10-11-14.png


Does anyone have a clue on this?
 
THtWswG.png

do you get that window during execution? In my case it didn't load the module commands even though they were supposed to be loaded. I added them first via powershell command and then script started working, or at least I think it helped. In any case I started fresh and done everything as described here: https://gallery.technet.microsoft.com/scriptcenter/Device-Management-7fad2388#content
or
http://blogs.technet.com/b/wincat/a...owershell-cmdlets-sample-an-introduction.aspx
and then followed tutorial here.
Still can't figure out if it was due to something not "unblocked" or not properly added as a module tho.
 
You do not need to load the module as described in your links.
the important is "Set-ExecutionPolicy RemoteSigned" to execute once in powershell (as admin)
 
I use the script as following - then i do not need to run as administrator:

##########################################################################
# Get the ID and security principal of the current user account
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)

# Get the security principal for the Administrator role
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator

# Check to see if we are currently running "as Administrator"
if ($myWindowsPrincipal.IsInRole($adminRole))
{
# We are running "as Administrator" - so change the title and background color to indicate this
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Elevated)"
$Host.UI.RawUI.BackgroundColor = "DarkBlue"
clear-host
}
else
{
# We are not running "as Administrator" - so relaunch as administrator

# Create a new process object that starts PowerShell
$newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";

# Specify the current script path and name as a parameter
$newProcess.Arguments = $myInvocation.MyCommand.Definition;

# Indicate that the process should be elevated
$newProcess.Verb = "runas";

# Start the new process
[System.Diagnostics.Process]::Start($newProcess);

# Exit from the current, unelevated, process
exit
}

#-----------------------------------------------------------------------------------------

$devicemgmtmodule = "C:\Users\Neko\OneDrive\Programme\DeviceManagement\Release\DeviceManagement.psd1"
import-module $devicemgmtmodule
get-device | where-object -property name -eq "HID-konformer Touchscreen" | disable-device
######################################################################################
 
Last edited:
@vxm,
I had the same result as you did. I partially solved the problem by going into the Properties for each of the downloaded cmdlet files and clicked Unblock.
Now I get a different error:
View attachment 6171

Does anyone have a clue on this?

As Neko wrote, does your Windows Language is English? If not, you need to change the HID-compliant touch screen for the term in the language. I will edit the first post to add this information.
 
Yup, my system language was english with polish/english input, so in my case it wasn't a problem. It just wouldn't load the Cmdlets module and it was causing error- Powershell couldn't find command. Problem fixed itself somehow when I downloaded module again and did everything according to technet how-to, so I can't really tell if it had something to do with unblocking files or execution policy. It works now, so I'm okay :)
 
I really would like to get this going on my SP3. I've tried everything suggested but still get the same error. In my earlier post I didn't show the whole screen so here it is:
upload_2015-5-25_9-46-47.png

@Neko suggested that the name might be incorrect. I'm using US English, and the device name in my control panel is "HID-compliant touch screen", just the way it's shown here. But just to check, I tried to run the following code to get the list of devices, but got the same error.

Get-Device | Sort-Object -Property Name | ft Name, InstanceId -AutoSize

It's as if it isn't recognizing a command.
 
As you also have the script in your onedrive folder you must ensure, that they are offline available - even if I were online, I also got error messages until I marked the whole folder as offline avaible. In my case off course not the whole onedrive, but "C:\Users\Neko\OneDrive\Programme\DeviceManagement\"
 
@Neko, thanks for that hint. I moved the whole Release folder to my C:\Users\Dan folder and changed the script to eliminate any possible Onedrive issues, but still the same result.
I noted that in the Q&A section of the TechNet article that @vxm referenced upthread, two other people reported the same issue, but there was not a suggested resolution except to be sure that the session is elevated.
upload_2015-5-25_14-13-24.png
 
Back
Top