如何通过PowerShell运行GoogleAppsManager

时间:2013-02-24 01:40:42

标签: powershell google-apps

我正在使用powershell来加载.csv文件并执行Google Apps Manager命令。

代码:

$list = Import-Csv usuarios.csv
foreach ($entry in $list)
{
    .\gam.exe create user $($entry.emailaddress) firstname $($entry.FirstName) lastname $($entry.LastName) password $($entry.Password)
}

我遇到了这个问题:

Google Apps Manager 2.55 jay@ditoweb.com(Jay Lee)Python 2.7.3 32位最终版Windows-XP-5.1.2600-SP3 x86

用法:gam [OPTIONS] ...

Google Apps Manager。检索或设置Google Apps域,用户,组和别名设置。详尽的命令列表可在以下位置找到:http://code.google.com/p/google-apps-manager/wiki

示例:gam信息域gam创建用户jsmith firstname John lastname史密斯密码secretpass gam更新用户jsmith挂起gam.exe更新组公告添加成员jsmith ...

我已经搜索过它,但没有找到任何参考资料。

谢谢。

1 个答案:

答案 0 :(得分:1)

我发现了问题

正确的代码:

$list = Import-Csv usuarios.csv
foreach ($entry in $list)
{  
   .\gam.exe create user $entry.username firstname $entry.firstname lastname $entry.lastname password $entry.password
}

谢谢。