(no subject)
Nov. 17th, 2017 04:12Сегодня у меня на работе случилась истерика.
Понадобилось узнать WWN сервера с Windows 2012.
Гугление мгновенно показало, что...
Не откажу себе в удовольствии скопировать сюда текст скрипта по ссылке:
Там же по ссылке был и вариант чуть покороче:
Да, они охуели. И что?
Ничего.
Понадобилось узнать WWN сервера с Windows 2012.
Гугление мгновенно показало, что...
WWNs of HBAs are always available in BIOS or the controller setup during pre-boot on servers that have them installed. How to view it depends on the manufacturer. You can also use a Powershell script to query WMI for that information. http://gallery.technet.microsoft.com/scriptcenter/Find-HBA-and-WWPN-53121140 has a script that will do this for you.
Marked as answer by Boo_MonstersIncMicrosoft contingent staff, Moderator Sunday, December 16, 2012 12:49 PM
Не откажу себе в удовольствии скопировать сюда текст скрипта по ссылке:
function Get-HBAWin { param( [String[]]$ComputerName = $ENV:ComputerName, [Switch]$LogOffline ) $ComputerName | ForEach-Object { try { $Computer = $_ $Params = @{ Namespace = 'root\WMI' class = 'MSFC_FCAdapterHBAAttributes' ComputerName = $Computer ErrorAction = 'Stop' } Get-WmiObject @Params | ForEach-Object { $hash=@{ ComputerName = $_.__SERVER NodeWWN = (($_.NodeWWN) | ForEach-Object {"{0:X2}" -f $_}) -join ":" Active = $_.Active DriverName = $_.DriverName DriverVersion = $_.DriverVersion FirmwareVersion = $_.FirmwareVersion Model = $_.Model ModelDescription = $_.ModelDescription } New-Object psobject -Property $hash }#Foreach-Object(Adapter) }#try catch { Write-Warning -Message $_ if ($LogOffline) { "$Computer is offline or not supported" >> "$home\desktop\Offline.txt" } } }#Foreach-Object(Computer) }#Get-HBAWin
Там же по ссылке был и вариант чуть покороче:
you may use the PowerShell command, Get-WmiObject to retrieved the information in Windows Server 2012.
For example:
Get-WmiObject -class MSFC_FCAdapterHBAAttributes -namespace "root\WMI" | ForEach-Object {(($_.NodeWWN) | ForEach-Object {"{0:x}" -f $_}) -join ":"}
If you need assistance with PowerShell, this forum could help you.
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell
Hope this helps.
Да, они охуели. И что?
Ничего.