[wpkg-users] Trouble enabling PowerShell Remoting from WPKG

Paul Griffith paulg at cse.yorku.ca
Fri May 23 23:59:18 CEST 2014


Hi Keith,

    WPKG runs under the SYSTEM account, from the WPKG service.

Paul

Quoting Keith Jones <K.E.Jones at brighton.ac.uk>:

> Hi Paul.
>
>  WPKG only has the privs that the account it runs from/under has.  
> How/when are you running it?
>
> Keith
>
> -----Original Message-----
> From: wpkg-users-bounces at lists.wpkg.org  
> [mailto:wpkg-users-bounces at lists.wpkg.org] On Behalf Of Paul Griffith
> Sent: 23 May 2014 19:54
> To: wpkg-users at lists.wpkg.org
> Subject: [wpkg-users] Trouble enabling PowerShell Remoting from WPKG
>
> Greetings,
>
>     I have been running into a brick wall trying to turn on  
> PowerShell Remoting via WPKG, all attempts have failed. If I run the  
> wpkg package from a admin prompt, it works. When I try the same  
> thing from the WPKG it fails. Is there anything special I have to do  
> to enable PowerShell Remoting from the system account ?
>
>
> In the Eventlog I see the error message "Connecting to the remote  
> server failed with the following message: Access is denied"
>
> Any pointers? Do need to do something with the System account ?
>
> Here is my package file, I adapted from Dafydd Jones.
>
>
> ----snip----
> <?xml version="1.0" encoding="UTF-8"?>
>
> <packages:packages
>          xmlns:packages="http://www.wpkg.org/packages"
> xmlns:wpkg="http://www.wpkg.org/wpkg"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://www.wpkg.org/packages
> ../../xsd/packages.xsd" >
>      <package id="ps-remoting"
>              name="Enable Powershell Remoting"
>              revision="%PKG_VERSION%rc1"
>              reboot="false"
>              priority="10">
>
>          <variable name="PKG_VERSION"     value="1" />
>          <variable name="PKG_NAME"        value="ps-remoting" />
>          <variable name="PKG_SOURCE"      value="%SOFTWARE%\"/>
>          <variable name="PKG_DESTINATION" value="%ProgramFiles%\"
> architecture="x86"/>
>          <variable name="PKG_DESTINATION" value="%ProgramFiles(x86)%\"
> architecture="x64"/>
>
>          <check type="execute" path='powershell -NonInteractive  
> -Command "if (Invoke-Command localhost {1}) {exit 0} else {exit 1}"'
> condition="exitcodeequalto" value="0"/>
>
>          <install cmd='powershell -ExecutionPolicy Unrestricted  
> -NonInteractive -Command "Enable-PSRemoting -Force" '/>
>          <install cmd='powershell -ExecutionPolicy Unrestricted  
> -NonInteractive -Command "Set-Item  
> WSMan:\localhost\Client\TrustedHosts
> -Value * -Force" '/>
>
>
>          <upgrade include="install" />
>
>         <remove cmd='powershell -ExecutionPolicy Unrestricted  
> -NonInteractive -Command "Disable-PSRemoting -Force" '/>
>
>      </package>
> </packages:packages>
> ----snip----
>
> Thank You
> Paul







More information about the wpkg-users mailing list