主要在于开启xp_cmdshell,然后运行powershell获取
exec sp_configure 'show advanced options', 1;reconfigure;
exec sp_configure 'xp_cmdshell',1;reconfigure;
--2.2 关闭 xp_cmdshell:
exec sp_configure 'show advanced options', 1;reconfigure;
exec sp_configure 'xp_cmdshell', 0;reconfigure;
exec xp_cmdshell 'wmic nic get MACAddress /format:list'
exec xp_cmdshell 'ipconfig /all'
select *,net_address from master..sysprocesses
where hostname='?'
and program_name='?'
exec xp_msver 'Platform'
--获取cpu序列号
EXEC xp_cmdshell 'powershell.exe -Command "(Get-CimInstance -ClassName Win32_Processor).ProcessorId"';