The following error is occurring running Add-WindowsFeature:
PS C:\Users\pornograph> Add-WindowsFeature -Name "DSC-Service" -IncludeAllSubFeature -ErrorVariable errorVar
Add-WindowsFeature : The request to list features available on the specified server failed.
A DISM session could not be opened.
An error occurred. The directory in the temporary folder D:\TEMP\ could not be created.
Ensure that the path to the temporary folder exists and that you have Read/Write permissions on the folder. Error:
0x80070003
At line:1 char:1
+ Add-WindowsFeature -Name "DSC-Service" -IncludeAllSubFeature -ErrorVariable erro ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],DeploymentProviderException
+ FullyQualifiedErrorId : DISMAPI_Error__Failed_Opening_Dism_Session,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand
Where is D:\TEMP\
coming from?
TEMP
and TMP
= E:\TEMP
TEMP
and TMP
= C:\Users\etc.
4 0 -1 -1
(Edit to original question seems to be stuck in moderation, so here it is again:)
UPDATE: It appears to be in the registry (most likely set in the original server image):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-PowerShell-DSC-PullServer-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384
InstallLocation
= "\\?\D:\temp\Dism\IDASF2ZC\{GUID}\"
The entire HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing
tree is owned by TrustedInstaller (all others = read only). Granting write and changing the value seemed to make no change (D:\TEMP
still being used) - does something need to be restarted for the new value to be read?
Running as admin is not an option unfortunately.
User contributions licensed under CC BY-SA 3.0