728x90

When I am attempting to investigate a setup-related failure, I typically end up looking at verbose log files.  These log files can contain information about a wide variety of failures, and the failures will typically include some detailed error information (such as the information reported by the GetLastError and FormatMessage APIs or something equivalent to them).  In the case of verbose Windows Installer log files, I find the error information in most cases by searching for the text "return value 3" as described in this blog post.

Once I find the error information, I can often recognize the error codes from my past experience.  However, there are also a lot of cases where I run into error codes that I do not recognize from past experience.  When that happens, I use a tool that helps me translate error codes (normally HRESULT values from function calls) into more readable information.  Doing this can help me better understand what the error means, which in turn can help give ideas for what might be causing the error and what types of fixes might help eliminate the error.

Recently, I discovered that the tool that I've been using to do error code translation is available on the Microsoft Download Center so that anyone can get a copy and use it themselves.  You can find the tool, called Err.exe, at http://www.microsoft.com/downloads/details.aspx?familyid=be596899-7bb8-4208-b7fc-09e02a13696c.  This site describes the tool as an Exchange Server Error Code Look-up, but this tool actually aggregates information from 172 sources (header files, etc) from Windows and various other products around Microsoft and is not only useful for Exchange Server issues.

For example, it includes information from corerror.h (a header file that ships with the .NET Framework SDK and Windows SDK) so it can report error information for some types of .NET Framework errors.  Here are a couple of specific examples of the output produced by err.exe:

For error code 0x8002802F (described in more detail here):

Err.exe 0x8002802F
# for hex 0x8002802f / decimal -2147319761 :
  TYPE_E_DLLFUNCTIONNOTFOUND                                    winerror.h
# Function not defined in specified DLL.
# 1 matches found for "0x8002802F"

For error code 0x80070005 (described in more detail here):

Err.exe 0x80070005
# for hex 0x80070005 / decimal -2147024891 :
  COR_E_UNAUTHORIZEDACCESS                                      corerror.h
# MessageText:
# Access is denied.
  DIERR_OTHERAPPHASPRIO                                         dinput.h
  DIERR_READONLY                                                dinput.h
  DIERR_HANDLEEXISTS                                            dinput.h
  DSERR_ACCESSDENIED                                            dsound.h
  ecAccessDenied                                                ec.h
  ecPropSecurityViolation                                       ec.h
  MAPI_E_NO_ACCESS                                              mapicode.h
  STIERR_READONLY                                               stierr.h
  STIERR_NOTINITIALIZED                                         stierr.h
  E_ACCESSDENIED                                                winerror.h
# General access denied error
# 11 matches found for "0x80070005"

In some cases, as shown above for error code 0x80070005, the same error code can map to different meanings in different header files.  In those cases, it is sometimes necessary to make an educated guess about which one is the actual error code being generated by a setup error.  For example, in most cases, if an error code from winerror.h is listed in the output from err.exe, that one is the actual error code.

It is important to note that Err.exe is not intended to be a diagnostic tool on its own.  In other words, it will not be able to tell you how to fix a problem just based on what the error code is.  However, in my experience, Err.exe is very useful as a step along the path of attempting to solve a problem because it provides additional information about what an error code means.  Once you have a better idea about what an error code means, you can often use this additional information to perform some additional Web searches to learn about possible causes of and workarounds for specific types of errors.

 

 

https://blogs.msdn.microsoft.com/astebner/2008/06/17/information-about-the-err-exe-tool-i-use-to-look-up-error-codes-when-debugging-setup-issues/

 

오류코드참조

https://mani4u.tistory.com/24

728x90
728x90

Lately, I have found myself in situations where I don’t have full domain admin rights while working on Lync. This isn’t a bad thing but one area that I consistently run into issues with is the Lync Management Shell. If you are on a Lync Front-end and you don’t have Administrator rights, the local Lync Management Shell doesn’t actually do Role Based Access Control (RBAC). Therefore, I’ll try to execute a command (say, set-csuser, grant-csdialplan, etc) and get a permission denied. Yet, I can go into the Lync Control Panel and change a setting on the user just fine.

The way around this is remote PowerShell. Since I work on many different clients, I wrote a nice little script that will prompt me for my credentials and the remote server or pool.

 

############################################
# Connect-LyncRemotePoSH.ps1
# Written By: Adam Ball
# Version History:
# 1.0 - 12/12/2013 - Initial Script
#
############################################

#You can pass a server or pool name with the script (i.e. .\Connect-LyncRemotePoSH.ps1 myserver.mydomain.com )
param ($poolname)

#If no server or pool was passed when the script executed, pop up a box and ask for it.
if ($poolname -eq $null){
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$poolname = [Microsoft.VisualBasic.Interaction]::InputBox("Enter a Pool or Server to connect to", "Remote Lync Pool or Server", "")
}

#Change the server or pool name in to a properly constructed URL
$poolname = "https://" + $poolname + "/OcsPowershell"
$cred = Get-Credential
$session = New-PSSession -ConnectionURI $poolname -Credential $cred
Import-PsSession $session

 

To execute, simply run the script (assuming proper execution policy is set). It will pop-up a box and ask you for the remote server or pool then pop up another box and ask for your credentials. You can also pass the server or pool name to it as part of the script execution (i.e. “.\Connect-LyncRemotePoSH.ps1 mypool.mydomain.com”).

This is also a nice way for being able to do Lync Management from your desktop without having the Lync tools installed.

Just remember, when you are done, remove the session by running “Remove-PsSession $session”.

FYI

https://phyler.wordpress.com/2013/12/12/lync-and-remote-powershell/

https://support.4it.com.au/article/files-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system/

http://blog.insidelync.com/2011/08/remote-lync-powershell-administration/

 

Since you're using a third party firewall im assuming the native firewall is disabled? In any case double check your firewall rules to ensure 5895 and 5986 (if using ssl) inbound are allowed from your ip, on any port.

 

1. 방화벽 상태 확
   opened ports 80, 135, 443, 445, 5985, and 5986, but I am still unable to connect to the remote machine with the firewall enabled.

2. FE 서버와 파워셀을 날릴 서버에서 파워쉘 Policy "RemoteSigned" 설정
get-ExecutionPolicy RemoteSigned

$credential = get-credential
$sessionoption = new-pssessionoption -SkipRevocationCheck -SkipCAcheck -skipCNcheck
$session = New-PSSession -ConnectionUri https://pool01.mani4u.com/ocspowershell -credential $credential -SessionOption $sessionoption
IMport-Pssession $session

 

728x90

+ Recent posts