I manage a network of over 100 2008R2 Servers. There is no domain on the network for various reasons. I am running Enable-PSRemoting -Force
on all the servers. Some of them are running just fine, but a bunch are producing an error creating a temp file.
PS C:\Users\Administrator> Enable-PSRemoting -Force
WinRM already is set up to receive requests on this machine.
WinRM already is set up for remote management on this machine.
Register-PSSessionConfiguration : Cannot write shell configuration data into temporary file C:\Users\Administrator\AppData\Local\Temp\2\tldeudyv.td3psshell.xml. Try again. Reason for failure: Could not find a part of the path 'C:\Users\Administrator\AppData\Local\Temp\2\tldeudyv.td3psshell.xml'..
At line:57 char:60
+ $null = Register-PSSessionConfiguration <<<< Microsoft.PowerShell32 -processorarchitecture x86 -
force
+ CategoryInfo : InvalidOperation: (:) [Register-PSSessionConfiguration], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RegisterPSSessionConfigurationCommand
PS C:\Users\Administrator>
In addition to the error above, it also produces an error in the error log with ID 10149.
Log Name: System
Source: Microsoft-Windows-WinRM
Date: 3/6/2017 9:14:31 AM
Event ID: 10149
Task Category: None
Level: Warning
Keywords: Classic
User: N/A
Computer: CCAC1-16
Description:
The WinRM service is not listening for WS-Management requests.
User Action
If you did not intentionally stop the service, use the following command to see the WinRM configuration:
winrm enumerate winrm/config/listener
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-WinRM" Guid="{A7975C8F-AC13-49F1-87DA-5A984A4AB417}" EventSourceName="WinRM" />
<EventID Qualifiers="7">10149</EventID>
<Version>0</Version>
<Level>3</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2017-03-06T14:14:31.000000000Z" />
<EventRecordID>45009</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>System</Channel>
<Computer>CCAC1-16</Computer>
<Security />
</System>
<EventData Name="Stopped Listening">
</EventData>
</Event>