首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Connectwise API Powershell模块问题

Connectwise API Powershell模块问题
EN

Stack Overflow用户
提问于 2022-05-03 00:41:18
回答 1查看 52关注 0票数 1

是否有人使用https://www.powershellgallery.com/packages/ConnectWiseManageAPI/0.4.9.0中的cmdlet?

新的cwmcompanyconfiguration

我的问题来自它,它要求一些必需的参数作为哈希表。我不太确定我需要什么作为价值。不幸的是,我一直无法找到任何代码示例,这是在线使用的任何地方。

我的例子:

代码语言:javascript
运行
复制
$Company = '250'
$name = 'API Test Device'
$type = "Servers - Linux"
$info  = "test"
$IPaddress = 'test'
$ostype = 'test'
$serialnumber = 'test'


New-CWMCompanyConfiguration -company $company -name $name -type $type -_info $info -ipAddress $IPaddress -osType $ostype -serialNumber $serialnumber -verbose

它希望公司,类型和信息作为哈希表,不确定什么键/值对给它。

EN

回答 1

Stack Overflow用户

发布于 2022-05-03 15:33:09

我必须检查Get-CWMCompanyConfiguration返回的配置的格式。

代码语言:javascript
运行
复制
Example of what worked:
$company = @{"id"="250"}
$name = 'API Test Device'
$type = @{"name"="Servers - Linux"}
$IPaddress = "123.123.123.123"
$ostype = "Test"
$serialnumber = "Test"
New-CWMCompanyConfiguration -company $company -name $name -type $type -ipAddress $IPaddress -osType $ostype -serialNumber $serialnumber
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72093752

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档