使用 PowerShell 的帶有 C 驅動程式 1.7 的 MongoDB
我需要從虛擬機器查詢所有細節並更新到 MongoDB。
Which require the output look like this.
{
"_id" : ObjectId("5800509f23888a12bccf2347"),
"ResourceGrp" : "XYZZ-MachineGrp",
"ProcessTime" : ISODate("2016-10-14T03:27:16.586Z"),
"SubscriptionName" : "GSS",
"OS" : "Windows",
"HostName" : "VM1",
"IPAddress" : "192.168.22.11",
"Tags" : {
"costCenter" : "803344",
"BusinessUNIT" : "WinEng",
"MachineRole" : "App",
"OwnerEmail" : "zteffer@somewhere.com",
"appSupporter" : "Steve",
"environment" : "Prod",
"implementationOwner" : "xyzr@somewhere.com",
"appSoftware" : "WebServer",
"Code" : "Gx",
"WholeOwner" : "zzzgg@somewhere.com"
},
"SubscriptionID" : "",
"Status" : "running fine",
"ResourceGroupName" : "XYZZ-MachineGrp",
"LocalTime" : "14-10-2016-11:27"
}