Warning: Constant ABSPATH already defined in /customers/0/c/e/ogenstad.net/httpd.www/wp-config.php on line 24
Warning: Cannot modify header information - headers already sent by (output started at /customers/0/c/e/ogenstad.net/httpd.www/wp-config.php:24) in /customers/0/c/e/ogenstad.net/httpd.www/wp-includes/feed-rss2-comments.php on line 8
the powershell works creating one sheet, can you incorporate the information that was going to the other sheets as well in some way shape of form
<#
Martin Gomez
read xml into csv file. the xml input for this was produced by runing Sydi against a list of servers.
this is a snip of the xml data. to read serial number. the header is ..identifyingnumber (computer.machineinfo.identifyingnumber)
#>
cls
$path = “C:\Temp\Sydi_inventory\XML”
$OutPath = “C:\Temp\Sydi_inventory”
$ErrorActionPreference = “SilentlyContinue”
$xmls = gci $path\*.xml | select -ExpandProperty name
foreach ($xml in $xmls){
[xml]$Systemfile = get-content “$path\$xml”
foreach( $System in $Systemfile)
{
$a = $System.computer.system.name
$b = $System.computer.machineinfo.identifyingnumber
$c = $System.computer.machineinfo.manufacturer
$d = $System.computer.machineinfo.productname
$e = $System.computer.network.adapter.ip
$H = $System.computer.fqdn | select -ExpandProperty name
$i = $System.computer.operatingsystem | select -ExpandProperty name
$f = $e | select -First 1 | select -ExpandProperty address
$j = $e | select -First 1 | select -ExpandProperty subnetmask
$g = $e | select -Skip 2 | select -first 1 | select -ExpandProperty address
$k = $e | select -Skip 2 | select -first 1 | select -ExpandProperty subnetmask
$l = $e | select -Skip 4 | select -first 1 | select -ExpandProperty address
$m = $e | select -Skip 4 | select -first 1 | select -ExpandProperty subnetmask
$pos = $H.IndexOf(“.”)
$rightPart = $H.Substring($pos+1)
IF ($rightPart -like $null){$rightPart = “Workgroup” }
$1 = new-object psobject
$1| Add-Member name $a
$1| Add-Member Domain $rightPart
$1| Add-Member Serial $b
$1| Add-Member Manufacturer $c
$1| Add-Member model $d
$1| Add-Member IP1 $f
$1| Add-Member IP1_mask $J
$1| Add-Member IP2 $g
$1| Add-Member IP2_mask $K
$1| Add-Member IP3 $l
$1| Add-Member IP3_mask $m
$1| Add-Member OS $i
}
Write-Output $1 | Export-Csv $OutPath\Sydi_Hostlist.csv -NoTypeInformation -Append
}
where i should give the permission it needs?
]]>Firstly thank you very much for this script, I first used your script in 2005 and was very helpful, now i need to run this in my network server script is working fine but iam having issue with SQL & Exchange script, SQL script against sql 2012 hanging at getting SQL Jobs and just setting there for hours and Exchange against exchange 2007 not recognizing server, am I doing something wrong ??
]]>I run an issue with sydi-wrapper.vbs
I want the output to be in MS-Word format rather than in XML format and put some word options like:
-b”Table List 4″
-f10
-d
Where can I modify the the sydi-wrapper.vbs?
Thank you.
]]>My initial minimal testing has produced great results… minimal effort – low level – granular information… fantastic.
If I wish to use this commercially (in the council – ~100 servers (50 production) – what is the costing model… ?
Alec Waskiw
]]>I am trying to run the overview and export
cscript.exe sydi-overview.vbs -x”C:\Scripts\Output files”
it begins to read the .xml files in the target folder but then after the Opening Excel File line, the command line window displays the following error
c:\Scripts\sydi-overview.vbs(549, 2) Microsoft VBScript runtime error: Object required: ‘objExcel.Cells(…).Value’
otherwise everything works perfectly with the exception of this one portion of the script.
]]>Thanks!
Jake