检查服务器上的远程磁盘空间 [英] Check remote disk space on server
问题描述
亲爱的,
我正在寻找VB脚本或PowerShell来登录服务器并检查磁盘空间并导出为CSV
我可以找到脚本来检查磁盘空间并导出到csv。我找不到一个会使用我的凭证的
我将从我的PC(本地帐户)运行脚本并使用以下命令连接到远程服务器域名帐户
任何想法?
问候彼得
您可以从脚本中心获取更多PowerShell和VB脚本
搜索脚本
https://gallery.technet.microsoft.com/scriptcenter
示例代码:
" RemoteComputer" ,"Localhost", ,"RemoteComputer"| %{
Get-WmiObject -Class Win32_logicaldisk -ComputerName
_ -Filter DriveType = 3 |
选择SystemName,DeviceID,@ {Name =" size(GB)" ;; Expression = {" {0:N1}" -f(
_。size / 1gb)}},@ {Name =" freespace(GB)" ;; Expression = {" {0:N1}" -f(
Dear all,
Im looking for a VB Script or PowerShell to login to a server and check disk space and export to a CSV
I can find scripts to check the disk space and export to csv. I cant find one that will use my credential's
I will run the script from my PC (local account) and connect to remote servers using a domain account
Any ideas?
Regards Peter
You can get more PowerShell and VB script from Script Center
Search for script
https://gallery.technet.microsoft.com/scriptcenter
Sample code:
"RemoteComputer" , "Localhost" , "RemoteComputer"| %{ Get-WmiObject -Class Win32_logicaldisk -ComputerName
_ -Filter DriveType=3 | Select SystemName , DeviceID , @{Name="size(GB)";Expression={"{0:N1}" -f(
_.size/1gb)}}, @{Name="freespace(GB)";Expression={"{0:N1}" -f(
这篇关于检查服务器上的远程磁盘空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!