审核ISCSi的脚本 [英] Script to Audit ISCSi
问题描述
我写了下面的脚本tom audit iscsi,我得到如下输出。
$ AuditISCSI = Invoke-Command -ComputerName $ ComputerName {get-iscsisession} | FT PSComputerName,InitiatorPortalAddress,IsConnected -autosize
输出:
PSComputerName InitiatorPortalAddress IsConnected
-------------- ---------------------- ---------- -
slcqc038       10.214.89.117                True
有什么方法可以让我以这种格式获得输出
InitiatorPortalAddress:10.214.89.117
IsConnected:True
$
是。 学习基本的PowerShell,你将能够做到这一点:
学习PowerShell:
https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276
当你想要对象时不要使用FT。
Hi ,
I wrote below script tom audit iscsi and I am getting the output as below.
$AuditISCSI = Invoke-Command -ComputerName $ComputerName { get-iscsisession } | FT PSComputerName, InitiatorPortalAddress, IsConnected -autosize
Output:
PSComputerName InitiatorPortalAddress IsConnected
-------------- ---------------------- -----------
slcqc038 10.214.89.117 True
Is there any ways so that I will get the output in this format
InitiatorPortalAddress :10.214.89.117
IsConnected:True
Yes. Learn basic PowerShell and you will be able to do this:
Learn PowerShell: https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276
Don't use FT when you want objects.
这篇关于审核ISCSi的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!