我在Server 2008 SP2(64位)上执行导入模块ActiveDirectory时遇到问题.
......我明白了:
Import-Module : The specified module 'activedirectory' was not loaded because no valid module file was found in any module directory.
At line:1 char:14
+ import-module <<<< activedirectory
+ CategoryInfo : ResourceUnavailable: (activedirectory:String) [Import- Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Run Code Online (Sandbox Code Playgroud)
如果有任何帮助,这里是PSModule Path,模块和版本中的一些信息:
PS C:\Windows\system32> $env:PSModulePath
C:\Users\ischmd\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PS C:\Windows\system32> Get-Module -ListAvailable
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest BitsTransfer {}
Manifest PSDiagnostics {}
PS …Run Code Online (Sandbox Code Playgroud) 我有一个带有两个值的字节数组:07和DE(十六进制)。
我需要做的是以某种方式连接07DE并从该十六进制值中获取十进制值。在这种情况下,它是2014。
我的代码:
# This line gives 11 bytes worth of information
[Byte[]] $hexbyte2 = $obj.OIDValueB
# All I need are the first two bytes (the values in this case are 07 and DE in HEX)
[Byte[]] $year = $hexbyte2[0], $hexbyte2[1]
Run Code Online (Sandbox Code Playgroud)
我如何组合这些来制作07DE并将其转换为 int 以获取2014?