PowerShell Modules

PS SQLSERVER:\> Import-Module AppController
Import-Module : The specified module 'AppController' was not loaded because no valid module file was found in any
module directory.
At line:1 char:1
+ Import-Module AppController
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (AppController:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
내가 모듈을 추가할 때 아래의 문제에 부딪혀 총괄해 보자.
사용 권한 확인
Get-ExecutionPolicy
하면, 만약, 만약...
다음을 수행합니다.
Set-ExecutionPolicy RemoteSigned
Y
Import-Module AppController 재시도
아니면 안 돼요. 모듈이 있는지 확인하세요.
PS C:\Windows\system32> $env:PSModulePath

PS C:\Users\******> $env:PSModulePath
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files\Microsoft System Center 2012 R2\Virtual Machine Ma
nager\bin\psModules\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\
설치된 파일 디렉터리가 없습니다.그래...우리는 그것을 덧붙인다.
#Save the current value in the $p variable.
$p = [Environment]::GetEnvironmentVariable("PSModulePath")

#Add the new path to the $p variable. Begin with a semi-colon separator.
$p += ";C:\Program Files (x86)\MyCompany\Modules\"

PS C:\Users\****> Get-Module -listAvailable
    Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
ModuleType Name                                ExportedCommands
---------- ----                                ----------------
Manifest   AppLocker                           {Set-AppLockerPolicy, Get-AppLockerPolicy, Test-AppLockerPolicy, Get-...
Manifest   BitsTransfer                        {Add-BitsFile, Remove-BitsTransfer, Complete-BitsTransfer, Get-BitsTr...
Manifest   CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSes...
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-WSM...
Script     PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, E...
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}
Manifest   WebAdministration                   {Start-WebCommitDelay, Stop-WebCommitDelay, Get-WebConfigurationLock,...
    Directory: C:\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager\bin\psModules
ModuleType Name                                ExportedCommands
---------- ----                                ----------------
Binary     virtualmachinemanager               {Get-SCStorageClusterDisk, Get-SCVMHostFibreChannelHba, New-SCVMHostF...
Binary     virtualmachinemanagercore           {Use-SCStopVM, Use-SCShutdownVM, Use-SCSaveStateVM, Use-SCDiscardSave...
    Directory: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules
ModuleType Name                                ExportedCommands
---------- ----                                ----------------
Manifest   SQLASCMDLETS                        {Add-RoleMember, Backup-ASDatabase, Invoke-ASCmd, Invoke-ProcessCube...}
Manifest   SQLPS                               {Backup-SqlDatabase, Add-SqlAvailabilityDatabase, Disable-SqlAlwaysOn...
    Directory: C:\Program Files (x86)\Microsoft System Center 2012 R2\App Controller\PowerShell Modules
ModuleType Name                                ExportedCommands
---------- ----                                ----------------
Binary     AppController
설치되어 있지만 AppController가 있습니다.하지만...명령이 없습니다.
AppController 설치 경로로 확인...다음 디렉터리에 자동으로 설치됩니다.그래서...좀 더 조정해 주세요.
PS SQLSERVER:\> Import-Module AppController
PS SQLSERVER:\> Get-Module
정말 문제 없어요.

좋은 웹페이지 즐겨찾기