성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
[정성태] Modules 창(Ctrl+Shift+U)을 띄워서, 해당 Op...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>Windows - Restart-Computer / shutdown 명령어 수행 시 Access is denied(E_ACCESSDENIED)</h1> <p> 이번 글은 예전에 설명했던 글의,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 계정 정보가 동일하지 않은 PC 간의 인증을 수행하는 방법 ; <a target='tab' href='https://www.sysnet.pe.kr/2/0/11978'>https://www.sysnet.pe.kr/2/0/11978</a> </pre> <br /> 검색용 버전입니다. ^^<br /> <br /> <hr style='width: 50%' /><br /> <br /> 대상 컴퓨터에 계정 연동이 안 돼 <a target='tab' href='Restart-Computer'>Restart-Computer</a>/<a target='tab' href='https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/shutdown'>shutdown</a> 명령어 수행 시 다음과 같은 Access Denied 오류가 발생할 수 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\temp> <span style='color: blue; font-weight: bold'>Restart-Computer -ComputerName 192.168.100.179 -Force</span> Restart-Computer : Failed to restart the computer 192.168.100.179 with the following error message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). At line:1 char:1 + Restart-Computer -ComputerName 192.168.100.179 -Force + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (192.168.100.179:String) [Restart-Computer], InvalidOperationException + FullyQualifiedErrorId : RestartcomputerFailed,Microsoft.PowerShell.Commands.RestartComputerCommand </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\temp> <span style='color: blue; font-weight: bold'>shutdown /r /m \\192.168.100.179</span> 192.168.100.179: Access is denied.(5) </pre> <br /> 해결 방법은, ^^ 어차피 인증 정보만 유효하면 되기 때문에 이전에 살펴본 글에 따라,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 네트워크 공유 폴더(net use)에 대한 인증 정보는 언제까지 유효할까요? ; <a target='tab' href='https://www.sysnet.pe.kr/2/0/11866'>https://www.sysnet.pe.kr/2/0/11866</a> </pre> <br /> 다음과 같이 명령어를 수행해 인증 정보를 제공한 다음 shutdown 명령을 수행하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > // 사용자 계정이 testusr인 경우 C:\temp> <span style='color: blue; font-weight: bold'>net use \\192.168.100.179 /USER:testusr</span> The password or user name is invalid for \\192.168.100.179. Enter the password for 'testusr' to connect to '192.168.100.179': The command completed successfully. </pre> <br /> 반면 Powershell의 경우에는 Get-Credential로 구성한 인증 정보를 PowerShell 명령행의 -Credential 인자에 전달하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS> $Creds = <a target='tab' href='https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential'>Get-Credential</a> PS> Restart-Computer -ComputerName 192.168.100.179 <span style='color: blue; font-weight: bold'>-Credential $Creds</span> -Force </pre> <br /> <hr style='width: 50%' /><br /> <br /> 참고로, net use의 경우 IPC$ 공유를 지정할 수도 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Windows remote shutdown: access denied ; <a target='tab' href='https://superuser.com/questions/403207/windows-remote-shutdown-access-denied'>https://superuser.com/questions/403207/windows-remote-shutdown-access-denied</a> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > // 사용자 계정이 testusr, 비밀번호가 qwer인 경우 C:\temp> <span style='color: blue; font-weight: bold'>net use \\192.168.100.179\IPC$ qwer /USER:testusr</span> The command completed successfully. </pre> <br /> 위의 경우 명령행에 직접 비밀번호가 노출되므로 생략 후 입력해도 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\temp> <span style='color: blue; font-weight: bold'>net use \\192.168.100.179\IPC$ /USER:testusr</span> \\192.168.100.179\IPC$에 대한 암호나 사용자 이름이 잘못되었습니다. '192.168.100.179'에 연결하기 위해 'testusr'의 암호 입력 : 명령을 잘 실행했습니다. </pre> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
4163
(왼쪽의 숫자를 입력해야 합니다.)