按月存檔:四月 2013

Hardware inventory Report for SCCM 2012

以下的語法 僅供參考 你可以使用RB3.0 或者直接在MS SQL下指令,取得你要的報表
Below example just for your reference!! You could use RM3.0 to build up your own report or you could run this in your sql server of sccm.

SELECT v_R_System.Netbios_Name0, CASE WHEN v_GS_PC_BIOS.SerialNumber0 LIKE ‘vmware%’ THEN ‘VM’ ELSE v_GS_PC_BIOS.SerialNumber0 END AS [Serial No],
v_GS_PC_BIOS.Manufacturer0, v_GS_PROCESSOR.Name0 AS [Processor],
v_GS_OPERATING_SYSTEM.Description0,
CASE WHEN v_GS_PROCESSOR.ADDRESSWIDTH0 = ’32’ THEN ’32 Bit’ ELSE ’64 Bit’ END AS [Processor Type],
CASE WHEN v_GS_PROCESSOR.IS64BIT0 = ‘1’ THEN ‘Yes’ ELSE ‘No’ END AS [64 Bit Supported],
v_GS_X86_PC_MEMORY.TotalPhysicalMemory0 / 1024 AS [Memory(MB)],CASE WHEN v_GS_DISK.MediaType0 = ‘Fixed hard disk media’ THEN ‘Fixed Hard Disk’ ELSE ‘Portable Drive’ END AS [Hard Disk Type], v_GS_DISK.Model0 AS [Disk Model], v_GS_DISK.Size0 AS [DISK SIZE], c.IPAddress AS [IP Address], v_GS_Operating_System.Caption0 AS [Operating system],
v_GS_Operating_System.Version0 AS [Operating system version], v_GS_OPERATING_SYSTEM.ServicePackMajorVersion0, CONVERT(nvarchar(10),
v_GS_OPERATING_SYSTEM.InstallDate0, 101) AS [Installed Date], CONVERT(nvarchar(10), v_GS_Operating_System.LastBootUpTime0, 101) AS [Rebooted On],
v_R_System.User_Name0, v_R_System.Resource_Domain_OR_Workgr0
FROM v_R_System INNER JOIN
(SELECT t1.resourceid AS rsid2, IPAddress = substring
((SELECT (IP_Addresses0 + ‘, ‘)
FROM v_RA_System_IPAddresses t2
WHERE t2.IP_Addresses0 NOT LIKE ‘169%’ AND IP_Addresses0 NOT LIKE ‘0.%’ AND IP_Addresses0 NOT LIKE ‘%::%’ AND t1.resourceid = t2.resourceid
ORDER BY resourceid FOR xml path(”)), 1, 50000)
FROM v_RA_System_IPAddresses t1
GROUP BY resourceid) c ON c.rsid2 = v_R_System.resourceid JOIN

v_GS_PC_BIOS ON v_R_System.ResourceID = v_GS_PC_BIOS.ResourceID JOIN
v_GS_OPERATING_SYSTEM ON v_R_System.ResourceID = v_GS_Operating_System.ResourceID JOIN
v_GS_X86_PC_MEMORY ON v_R_System.ResourceID = v_GS_X86_PC_MEMORY.ResourceID JOIN
v_GS_PROCESSOR ON v_R_System.ResourceID = v_GS_PROCESSOR.ResourceID JOIN
v_GS_DISK ON v_GS_DISK.ResourceID = v_GS_PROCESSOR.ResourceID 
ORDER BY v_R_System.Netbios_Name0, v_GS_PC_BIOS.SerialNumber0, v_GS_Operating_System.Caption0,
v_GS_Operating_System.Version0, v_GS_Operating_System.LastBootUpTime0, v_R_System.User_Name0, v_R_System.Resource_Domain_OR_Workgr0,
v_R_System.AD_Site_Name0

virtualbox resize virtual hard disk (擴大virtualbox 虛擬硬碟)

 

我使用VIRTUALBOX很久了 早在它被ORACLE併購之前

I used virtualbox for a long time ago, before SUN merged by Oracle.

這原是SUN的玩意兒 但不久變成ORACLE VIRTUALBOX了

Virtualbox was developed by SUN, and then became Oracle VIRTUALBOX.

它的虛擬硬碟內建格式是VDI 但我習慣仍使用VMDK 有天裝SERVER 裝完才發現C槽太小了 因為內定值25GB 裝完後 只剩2.5GB 覺得未來有問題 就想到要如何擴增虛擬硬碟的容量

its native virtual hard drive format is VDI, but i used to adopt VMDK. one day, i installed a server, and then just discovered that the C drive is too small, i used the default setting of virtualbox when i created the virtual hard drive,25GB, and after installation, i just encounter that hard drive space already left 2.5GB. I just realized that i should study how to enlarge the virtual hard drive.

擴增的順序如下:

the procedures of expand the virtual hard drive space as below:

首先要先CLONE原VMDK的檔為VDI,再調整SIZE大小,接著再改回VMDK格式

First, you should clone VMDK to VDI format, and just can resize it, and then clone the VDI back to VMDK.

以下是參考的語法

Below is the reference:

VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi
VBoxManage modifyhd "cloned.vdi" --resize 51200
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk