다음은이 디렉토리에서 사용 가능한 모듈 목록입니다. 보시다시피 DnsShell
거기 있습니다.
PS C:\windows\system32> Get-Module -ListAvailable
디렉토리 : C : \ windows \ system32 \ WindowsPowerShell \ v1.0 \ Module
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest ActiveDirectory {Get-ADRootDSE, New-ADObject, Rename- ADObject, Move-ADObject...}
Manifest AppLocker {Set-AppLockerPolicy, Get-AppLockerPolicy, Test-AppLockerPolicy, Get-AppLo...
Manifest BitsTransfer {Add-BitsFile, Remove-BitsTransfer, Complete-BitsTransfer, Get-BitsTransfe...
Manifest CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSession...}
Binary DnsShell
Script ISE {New-IseSnippet, Import-IseSnippet, Get- IseSnippet}
Manifest Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}
Manifest Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}
Manifest Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear- ItemProperty, Join-Path...}
Manifest Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable- WSManCredSSP, Get-WSManCredSSP, Set-WSManQui...
Script PSDiagnostics {Disable-PSTrace, Disable- PSWSManCombinedTrace, Disable-WSManTrace, Enable...
Binary PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-JobTrigger...}
Manifest PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest PSWorkflowUtility Invoke-AsWorkflow
Manifest TroubleshootingPack {Get-TroubleshootingPack, Invoke-TroubleshootingPack}
에 명령을 실행할 Import-Module DnsShell
때이 오류가 발생하고 이유를 모르겠습니다.
PS C:\windows\system32> Import-Module DnsShell
Import-Module : Could not load file or assembly
'file:///C:\windows\system32\WindowsPowerShell\v1.0\Modules\DnsShell\DnsShell.dll' or one of its dependencies. Operation is
not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module DnsShell
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
참고 : 사진을 게시했지만 serverfault에서 10 명 이상의 담당자가 필요했습니다.
답변
DnsShell.dll의 파일 속성을보고 일반 탭에서 맨 아래에 차단 해제 버튼이 있는지 확인하십시오. 원격 소스에서 파일을 다운로드 한 경우 발생할 수 있습니다.
답변
실행중인 PowerShell 버전 때문입니다. 이 모듈은 2.0에서만 실행됩니다. “powershell.exe -version 2.0″을 실행하여 2.0에서 오류가 발생하면 모듈을 가져 오십시오.
답변
http://dnsshell.codeplex.com/ 에서 모듈 다운로드
1- DnsShell.zip을 $ Env : PSModulePath에 표시된 경로 중 하나로 추출하십시오.
2- 실행 : Import-Module DnsShell
답변
나를 위해이 작업을 수행합니다.
- 다른 폴더로 추출하십시오.
- 모든 파일을 차단 해제하십시오.
- dnsshell 폴더를 모듈 폴더로 복사하십시오.
- 모듈을 가져옵니다.
답변
탐색기에서 차단 해제가 작동하지 않거나 차단 해제 할 파일이 많은 경우 https://technet.microsoft.com/fr-fr/sysinternals/streams.aspxstreams.exe
에 있는 Windows Sysinternals 도구를 사용하여 대체 데이터 스트림을 제거 할 수 있습니다. .
streams -s -d DNSSHELL_DIRECTORY
이 명령 은DNSSHELL_DIRECTORY
파일 및 모든 서브 디렉토리의 모든 대체 데이터 스트림 을 제거합니다 . 따라서 파일 시스템의 임의 부분에 사용하지 마십시오.
확실하게, 먼저 다음과 같이 스트림을 나열 할 수 있습니다.
streams -s DNSSHELL_DIRECTORY