我正在尝试做一些非常简单的事情,但是由于是 powershell 的新手,我无法找出问题所在:
PS C:\Windows\system32> $directoryMaker = New-Object [System.IO.Directory]::CreateDirectory("C:\test")
New-Object : Cannot find type [[System.IO.Directory]::CreateDirectory]: make sure the assembly containing this type is loaded.
At line:1 char:19
+ $directoryMaker = New-Object [System.IO.Directory]::CreateDirectory("C:\test")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand