@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:
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
}
@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
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:
@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
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.
It works the same way as the scripts above (i.e., it enables/disables the HID device) and you can enable/disable Touch by clicking on an icon in the system tray. Just follow the instructions to correctly identify the device. Let me know if you need any help.