小编Fre*_*ing的帖子

新对象PSCredential无法正常工作 - 在语法上使用Unicode标点符号

我试图接受用户名和密码作为Powershell脚本的参数,但是新的对象

$UserID="Name"
$SecurePassword=convertto-securestring -AsPlainText -Force -String $Password
New-object –TypeName System.Management.Automation.PSCredential –ArgumentList ($UserID,$SecurePassword)
Run Code Online (Sandbox Code Playgroud)

给出错误

新对象:找不到类型[ - TypeName System.Management.Automation.PSCredential - ArgumentList]:验证是否加载了包含此类型的as sembly.在C:\ ps\login.ps1:14 char:17 + ... rCredential = New-object - TypeName System.Management.Automation.PSCre ... + ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:InvalidType: (:) [New-Object],PSArgumentException + FullyQualifiedErrorId:TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

任何人都有一些线索如何解决这个问题?

unicode powershell utf-8 punctuation

2
推荐指数
1
解决办法
862
查看次数

我可以在java bean中调用我的函数但不使用get和set

我使用Per中的这个例子创建了一个简单的bean

http://per.lausten.dk/blog/2012/02/creating-your-first-managed-bean-for-xpages.html

我可以使用访问bean

helloWorld.setSomeVariable("test")

使用helloWorld.getSomeVariable()获取值

但是,当我使用EL语言尝试它时,它不起作用 helloWorld.SomeVariable

我得到一个错误,在helloWorld中不存在SomeVariable

我可能正在做一些简单的错误,但我看不出是什么.

xpages

1
推荐指数
1
解决办法
260
查看次数

标签 统计

powershell ×1

punctuation ×1

unicode ×1

utf-8 ×1

xpages ×1