随笔分类 -  PowerShell

摘要:$source = "http://www.leeholmes.com/favicon.ico"$destination="c:\temp\favicon.ico"$webClient = New-Object System.Net.WebClient$webClient.DownloadFile($source, $destination) 阅读全文
posted @ 2012-11-20 21:07 Lilideng 阅读(273) 评论(0) 推荐(0)
摘要:当我们需要在远程机器上跑一些PowerShell命令或者文件的时候,可以运行以下命令$secpassword = ConvertTo-SecureString "Password" -AsPlainText –Force$mycreds = New-Object System.Management.Automation.PSCredential ("Username", $secpassword)Enter-PSSession -ComputerName ComputerName -Credential $mycreds你可能会遇到以下错误:Enter- 阅读全文
posted @ 2012-11-20 17:10 Lilideng 阅读(2894) 评论(1) 推荐(0)