在本地主机上执行命令我得到访问被拒绝错误如下 PS C:\Windows\System32> winrs -r:localhost dir Winrs error:Access is denied. PS C:\Windows\System32> Followig是我的configuration PS C:\Windows\System32> winrm enumerate winrm/config/listener Listener Address = * Transport = HTTP Port = 80 Hostname Enabled = true URLPrefix = wsman CertificateThumbprint ListeningOn = 127.0.0.1, 192.168.1.3, ::1, 2001:0:4137:9e50:20d3:3b94:3f57:fefc, fe80::5efe:192.168.1.3%11, fe80::20 d3:3b94:3f57:fefc%12, fe80::adea:d512:c3d3:8b08%10 PS C:\Windows\System32> winrm get winrm/config Config MaxEnvelopeSizekb = 150 […]
是否有任何PowerShell命令行程序读取Exchange 2007 / Exchange 2010中的忙/闲信息? 我一直无法find任何。
我一直在寻找一个相对简单的答案来解决一个相当简单的问题:“如何增加可在Exchange 2007中发送和/或接收的附件的最大大小?”。 但是我还没有find可行的解决scheme。 我们有一个非常简单的设置:运行在单个服务器上的Exchange 2007 SP1,OWAangular色委托给另一台服务器。 我们在一两年前完成了Exchange 2007的全新安装:我们没有从以前的版本升级。 我忘了我们是否安装了RTM,然后将其修补到SP1,或者如果我们安装了SP1已经出炉了。我只是想我会提及这些项目,以防他们影响答案。 到目前为止,我已经尝试在主Exchange服务器上运行以下Powershell命令,并validation它们已经生效: Set-TransportConfig -MaxReceiveSize 40MB Set-ReceiveConnector "RcvConnector" -MaxMessageSize 40MB Set-MaxReceiveSize "MailboxName" -MaxReceiveSize 40MB 但是,到目前为止,指定的邮箱仍然拒绝超过10MB的邮件。 如果您还可以告诉我如何设置默认邮箱附件大小限制,那么您可以获得布朗尼点数,以便新帐户没有默认的Set-MaxReceiveSize值“无限制”,他们当前所做的。 任何意见或build议将不胜感激。 提前发送!
我是Powershell和Powercli的新手……但是我pipe理很less的ESX环境,真的想通过PowerShell尽可能地做到这一点。 我正在尝试尽可能地通过PowerShell来做到这一点。 在我需要帮助的时候: 我用这个class轮从模板创build虚拟机。 但问题是在每个新的虚拟机创build之后必须有一些用户input。 新VM名称 – 模板模板-VMHost VMHost – 数据存储数据存储 我想要做的是能够通过CSV导入新vm的名称,要使用的模板,主机将新vm和数据存储全部从CSV导入。 我不知道它是否像以下一样容易,但我不断收到错误。 Import-Csv "C:\powershell\Data\VM2Create.csv" | Foreach-object{ New-VM $_.name -Template $_.template -VMHost $_.VMHost -Datastore $_.Datastore } 我知道有一些()或{}或可能| 那需要…只是不知道把它们放在哪里… 我认为csv会是这样的: 名称,模板,虚拟主机,数据存储 任何帮助或想法将不胜感激…
我的本地机器上有一个函数foo。 (在我的个人资料中,但调用c:\ scripts \ foo.ps1也可以!)我如何加载ServerA和ServerB这样我可以在下一个语句执行该function? 这是我试图没有成功.. $serverlist = "192.168.20.1", "192.168.20.12" foreach ($item in $serverlist) { New-PSSession -ComputerName "$item" -Credential $cred -Name ($item + "_session") Invoke-Command -ComputerName $item -Credential $cred -filepath scripts:\foo.ps1 Invoke-Command -ComputerName $item -Credential $cred -scriptblock {foo} }
我试图获得一个PPP VPNnetworking连接的IP,但Win32_NetworkAdapterConfiguration似乎并没有“看到”它。 如果我使用我的脚本询问所有的适配器,它将看到除了PPP VPN适配器以外的所有东西。 是否有一个特定的filter或我需要启用,或者我需要一个不同的类? 我的脚本: $colItems = Get-wmiobject Win32_NetworkAdapterConfiguration foreach ($objItem in $colItems) { Write-Host Description: $objItem.Description Write-Host IP Address: $objItem.IPAddress Write-Host "" } 脚本输出: Description: WAN Miniport (SSTP) IP Address: Description: WAN Miniport (IKEv2) IP Address: Description: WAN Miniport (L2TP) IP Address: Description: WAN Miniport (PPTP) IP Address: Description: WAN Miniport (PPPOE) IP […]
我在尝试使用备用凭据从另一个PowerShell脚本运行PowerShell脚本。 如果我运行: $cred = get-credentials $localArgs = "/c Powershell c:\myscript.ps1" Start-Process cmd.exe -ArgumentList $localArgs -Credential $cred -WindowStyle="Hidden" 脚本错误与: Start-Process : Parameter set cannot be resolved using the specified named parameters. 如果我删除: -Credential $cred 脚本运行正常(但凭证错误)。 我在如何使用-Credential agument方面错过了一些东西? 谢谢, 本
我试图使用Powershell从远程打印服务器获取打印份额。 我在用着: Get-WmiObject Win32_Share -computerName "print-server" 我得到一个“访问被拒绝”的错误: Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) At line:1 char:14 + Get-WmiObject <<<< Win32_Share -computerName "print-server" + CategoryInfo : NotSpecified: (:) [Get-WmiObject], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetWmiObjectCommand 但是,我不明白为什么我可以看到这些共享,就好像我通过“我的电脑”连接(例如\\ print-server \),我可以看到所有的打印份额。 有任何想法吗? 谢谢。 本
Windows 7search索引服务在我们的networking上造成了一些问题 。 我们从中获得了大量的使用,但在用户正在积极工作的同时,却无法在白天运行。 因为即使索引服务处于closures状态,search也能正常工作(它只会search过时的索引),我想我们可以在半夜将服务打开几个小时以更新用户的索引,然后closures它再次。 我面临的问题是通过组策略find最好的方法。 Windows Server 2008 Windows 7客户端电脑 谢谢。
我有这个更改DNS设置的PowerShell脚本。 下面的脚本工作正常,但我想过滤MAC地址,以确保我正在更改正确的网卡。 $ computer =“pc01” $ NICs = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Computer $ computer -Filter“IPEnabled = TRUE” $ DNSServers =“192.168.1.1”,“192.168.1.2” ($ NIC中的$ NIC){$ NICs.SetDNSServerSearchOrder($ DNSServers) 所以我改变了filter使用MAC地址。 但是我得到以下错误。 $ computer =“pc01” $ NICs = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Computer $ computer -Filter“MACAddress = 00:1E:55:40:70:E8” $ DNSServers =“192.168.1.1”,“192.168.1.2” ($ NIC中的$ NIC){$ NICs.SetDNSServerSearchOrder($ DNSServers) 输出: 无效的查询+ $ NICs = […]