Loading...

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagepowershell
titleHRESULT 0x80338012
Error:
	Start-DscConfiguration fails with :
The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs
and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command
on the destination to analyze and configure the WinRM service: "winrm quickconfig".
    + CategoryInfo          : ConnectionError: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x80338012
    + PSComputerName        : DESKTOP-OJ9UH4H

Fix:
- check that the hostname is connect.
- Check the required ports are open on the firewall.
	see the preconfigured firewall settings named "Windows Remote Management".
- check WiRM is enabled. A quickfix, although limited to local host, run As Administrator:
 	winrm quickconfig
 
Code Block
languagepowershell
titleError number: -2144108183 0x80338169
Error: 
	WinRM fails with the following errors:
PS C:\Windows\system32> winrm quickconfig
WinRM is not set up to receive requests on this machine.
The following changes must be made:

Start the WinRM service.
Set the WinRM service type to delayed auto start.

Make these changes [y/n]? y

WinRM has been updated to receive requests.

WinRM service type changed successfully.
WinRM service started.
WSManFault
    Message
        ProviderFault
            WSManFault
                Message = WinRM firewall exception will not work since one of the network connection types on this machine is set to Public. Change the network connection type to either Domain or Private and try again.

Error number:  -2144108183 0x80338169
WinRM firewall exception will not work since one of the network connection types on this machine is set to Public. Change the network connection type to either Domain or Private and try again.
PS C:\Windows\system32>

Fix: 
Confugre network interface to Private of Domain. 
Click through : 
> Settings > Network & Internet > Status 
> "Network status" click on "Change Connection Properties" 
> "Network Profile" change from Public to Private.
Code Block
languagepowershell
titleHRESULT 0x80338104
Error:
	Start-DscConfiguration fails with :


The WS-Management service cannot process the request. The WMI service returned an 'access denied' error.
    + CategoryInfo          : PermissionDenied: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x80338104
    + PSComputerName        : DESKTOP-OJ9UH4H


Fix: 
- Run under an account that is authised to use the Windows Remote Managment service.
- Configure user access to Windows Remote Managment service.
- Run powershell "As Administrator" 

Code Block
languagepowershell
titleGetting the resulting output of Start-DscConfiguration
How to Check the outcome of "Start-DscConfiguration"


Use the Get-Job command and Recieve-Job.


Get-Job lists the jobs that are schedualed to run, Running, and completed. Note the name of the job you want the output from.


Used Recieve-job -name <job name> to get the resulting output.


eg:


PS C:\> get-job

Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
--     ----            -------------   -----         -----------     --------             -------
1      Job1            Configuratio... Completed     True            DESKTOP-OJ9UH4H      Start-DscConfiguration...

PS C:\> Receive-Job -Name Job1

PSComputerName
--------------
DESKTOP-OJ9UH4H

note that running Receive-Job with out -Keep will flush the output.