logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
leungda  
#1 Posted : Friday, March 9, 2018 12:14:54 AM(UTC)
leungda


Rank: Guest

Joined: 3/9/2018(UTC)
Posts: 5

Do you know any extension will display HDD or SSD status like:-

SMART status
Disk space usage
make
model
used hours
Scott  
#2 Posted : Monday, March 12, 2018 11:48:45 AM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,764
United States

Thanks: 3 times
Was thanked: 338 time(s) in 292 post(s)
To my knowledge there isn't an extension that has these capabilities but I can certainly see why it would be useful. I recommend registering a feature request within our Product Feedback Portal.

A brief search there shows a few existing issues that are pretty similar to your request such as this one or maybe this one.
ScreenConnect Team
cristobalcat  
#3 Posted : Friday, April 20, 2018 8:14:01 PM(UTC)
cristobalcat


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group Member

Joined: 11/19/2015(UTC)
Posts: 61
United States
Location: USA

Thanks: 47 times
Was thanked: 2 time(s) in 2 post(s)
Scott,

Could you add (if possible of course, I know might be tricky) on that info output, if the HD is mechanic or SSD type?
This is useful, specially with Windows Bitlocker, it seems they have different treatment at the moment to put it @ Active Domain OUs.
(IDK about it, what I know NOC have it in separate OUs, depend on type of HD)
hadi@ithoqto.com.au  
#4 Posted : Tuesday, April 24, 2018 12:20:34 AM(UTC)
hadi@ithoqto.com.au


Rank: Guest

Joined: 6/29/2017(UTC)
Posts: 1
Australia
Location: Geelong

Here is what i did .

Added the extension - Additional General Information

Modified the newinitializer.xml file and added the below codes in the specific areas
(First section)
SC.ui.addElement(descriptionList, 'dt', {id: 'mediatypeContainer', innerHTML: 'HDD Type:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'mediatypeValueContainer'});

(Second Section)
SC.ui.clear($('mediatypeValueContainer'));

(command Section)
"$mediatype = Get-PhysicalDisk | Select MediaType" + "\n" +

(Add in the write output) $mediatype.MediaType, (in the correct sequence to where you have added fieds tag)

Add in the function displaycommanddata

$('mediatypeValueContainer').innerHTML = x[NN].childNodes[0].textContent; (The NN is the location or the number of the sequence where the write output has created the xml data)

and the same below in the Else tag too


NOTE: it works most of the time if the powershell is installed on the machine , usually windows 8 and 10 and some win 7 machines.. but better than nothing.. or PM or email me i can send you the entire code with other additional codes that i have added on it like Bios Age of the computer
leungda  
#5 Posted : Thursday, May 3, 2018 9:37:52 PM(UTC)
leungda


Rank: Guest

Joined: 3/9/2018(UTC)
Posts: 5

Thank you hadi@ithoqto.com.au for a "GREAT" help and hints. I make the change on the file with additional functions. Unforturenaly, there is a limitation or bugs that I cannot figure it out. I understand SC might not be happy because someone modified their extension. Sorry for that but people seem to need it. Anyway, the bugs or limitation is if you have two values fall into the same "Property", it doesn't display on the Info tab. Ex, if you have two HDDs, IPv4+IPv6 or two anti-virus programs. it will not display at all. hadi@ithoqto.com.au told me he got it working on his site. I found out that if you are using Microsoft Edge, it will not display two values. If you are using Google Chrome, it works fine.

ONLY WORK WITH Windows 8 or above. Windows 7, Windows Server doesn't have Powershell command "Get-PhysicalDisk"

extension - Additional General Information
Here are the code and you can replace this: C:\Program Files (x86)\ScreenConnect\App_Extensions\d55008eb-fe3b-4285-a45c-b16d78156530\NewInitializer.js

After you replace the code, you need to "DISABLE" and "ENABLE" the extension - Additional General Information



var hasSentCommand = false;

SC.event.addGlobalHandler(SC.event.InitializeTab, function (eventArgs) {
if (isGeneralTab(eventArgs.tabName)){
hasSentCommand = false;
//var descriptionList = SC.ui.findDescendentByTag(eventArgs.container, "dl");
var descriptionList = eventArgs.container.firstChild;
SC.ui.addElement(descriptionList, 'dt', {id: 'modelContainer', innerHTML: 'Model :'});
SC.ui.addElement(descriptionList, 'dd', {id: 'modelValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'manufacturerContainer', innerHTML: 'Manufacturer:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'manufacturerValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'biosNameContainer', innerHTML: 'BIOS Name:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'biosNameValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'biosSerialContainer', innerHTML: 'BIOS Serial:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'biosSerialValueContainer'});
//SC.ui.addElement(descriptionList, 'dt', {id: 'BiosAgeContainer', innerHTML: 'BIOS Age:'});
//SC.ui.addElement(descriptionList, 'dd', {id: 'BiosAgeValueContainer'});
//SC.ui.addElement(descriptionList, 'dt', {id: 'domainNameContainer', innerHTML: 'Domain:'});
//SC.ui.addElement(descriptionList, 'dd', {id: 'domainNameValueContainer'});
//SC.ui.addElement(descriptionList, 'dt', {id: 'DHCPEnabledContainer', innerHTML: 'DHCP Enabled:'});
//SC.ui.addElement(descriptionList, 'dd', {id: 'DHCPEnabledValueContainer'});
//SC.ui.addElement(descriptionList, 'dt', {id: 'DHCPServerContainer', innerHTML: 'DHCP Server:'});
//SC.ui.addElement(descriptionList, 'dd', {id: 'DHCPServerValueContainer'});
//SC.ui.addElement(descriptionList, 'dt', {id: 'defaultGatewayContainer', innerHTML: 'Default Gateway:'});
//SC.ui.addElement(descriptionList, 'dd', {id: 'defaultGatewayValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'mediaFriendlyNameContainer', innerHTML: 'HDD Brand:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'mediaFriendlyNameValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'mediaSerialNumberContainer', innerHTML: 'HDD SN#:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'mediaSerialNumberValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'mediaSizeContainer', innerHTML: 'HDD Size (bytes):'});
SC.ui.addElement(descriptionList, 'dd', {id: 'mediaSizeValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'mediatypeContainer', innerHTML: 'HDD Type:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'mediatypeValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'mediaHealthStatusContainer', innerHTML: 'HDD Health:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'mediaHealthStatusValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'mediaPredictFailureContainer', innerHTML: 'HDD Predict Failure:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'mediaPredictFailureValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'antivirusContainer', innerHTML: 'Antivirus:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'antivirusValueContainer'});
SC.ui.addElement(descriptionList, 'dt', {id: 'internalIPAddressContainer', innerHTML: 'Internal IP Address:'});
SC.ui.addElement(descriptionList, 'dd', {id: 'internalIPAddressValueContainer'});
}
});

SC.event.addGlobalHandler(SC.event.RefreshTab, function (eventArgs) {
if (isGeneralTab(eventArgs.tabName)) {
SC.ui.clear($('modelValueContainer'));
SC.ui.clear($('manufacturerValueContainer'));
SC.ui.clear($('biosNameValueContainer'));
SC.ui.clear($('biosSerialValueContainer'));
//SC.ui.clear($('BiosAgeValueContainer'));
//SC.ui.clear($('domainNameValueContainer'));
//SC.ui.clear($('DHCPEnabledValueContainer'));
//SC.ui.clear($('DHCPServerValueContainer'));
SC.ui.clear($('internalIPAddressValueContainer'));
//SC.ui.clear($('defaultGatewayValueContainer'));
SC.ui.clear($('antivirusValueContainer'));
SC.ui.clear($('mediaFriendlyNameValueContainer'));
SC.ui.clear($('mediaSerialNumberValueContainer'));
SC.ui.clear($('mediaSizeValueContainer'));
SC.ui.clear($('mediatypeValueContainer'));
SC.ui.clear($('mediaHealthStatusValueContainer'));
SC.ui.clear($('mediaPredictFailureValueContainer'));
//SC.ui.clear($('antispywareValueContainer'));
}

if (isSupportedOperatingSystem(eventArgs.session.GuestOperatingSystemName))
displayInformationRequest(
getLatestInformationRequestEvent(
eventArgs.sessionDetails,
eventArgs.tabName
), eventArgs
);
});

function isSupportedOperatingSystem(operatingSystemName){
if (operatingSystemName.startsWith("Windows") || operatingSystemName.startsWith("Microsoft"))
return true;
else
return false;
}

function sendCommand() {
window.addEventToSessions(
window.getSessionGroupUrlPart()[0],
SC.types.SessionType.Access,
[window.getSessionUrlPart()],
SC.types.SessionEventType.QueuedCommand,
null,
getInputCommand(
"General"
),
false,
false,
true
);
}

function getInputCommand(commandType) {
var headers = getHeaders();
headers.CommandType = commandType;
var commandText = "$computer = get-wmiobject win32_computersystem | select Manufacturer, Model" + "\n" +
"$bios = get-wmiobject win32_bios | select Name, SerialNumber" + "\n" +
"$bay = Get-WmiObject -Class Win32_BIOS" + "\n" +
//"$BIOSageInYears = (New-TimeSpan -Start ($bay.ConvertToDateTime($bay.releasedate).ToShortDateString()) -End $(Get-Date)).Days / 365" + "\n" +
"$av = get-wmiobject -Namespace \"root/SecurityCenter2\" -Class AntiVirusProduct | Where {$_.displayName -notlike 'Windows Defender'} | select displayName" + "\n" +
//"$network = get-wmiobject Win32_NetworkAdapterConfiguration |Where {$_.ipaddress -notlike $null}| select DHCPEnabled, DHCPServer,IPAddress, DefaultIPGateway" + "\n" +
//"$network = get-wmiobject Win32_NetworkAdapterConfiguration |Where {$_.ipaddress -notlike $null} | select IPAddress" + "\n" +
"$network = get-WmiObject Win32_NetworkAdapterConfiguration|Where {$_.Ipaddress.length -gt 1}" + "\n" +
"$mediatype = Get-PhysicalDisk | Select MediaType, FriendlyName, SerialNumber, HealthStatus, Size" + "\n" +
"$mediafail = Get-WmiObject -namespace \"root/wmi\" -Class MSStorageDriver_FailurePredictStatus | select PredictFailure" + "\n" +
//"write-output $computer.Manufacturer, $computer.Model, $bios.Name, $bios.SerialNumber,$BIOSageInYears, $computer.Domain, $network.DHCPEnabled, $network.DHCPServer, $network.IPAddress, $network.DefaultIPGateway, $av.displayName, $mediatype.MediaType, $as.displayName| ConvertTo-Xml -As Stream";
"write-output $computer.Manufacturer, $computer.Model, $bios.Name, $bios.SerialNumber, $mediatype.FriendlyName, $mediatype.SerialNumber, $mediatype.Size $mediatype.MediaType, $mediatype.HealthStatus, $mediafail.PredictFailure $av.displayName, $network.IPAddress[0] $as.displayName| ConvertTo-Xml -As Stream";

var emptyLinePrefix = '';

if (headers.Processor == 'sh')
emptyLinePrefix = 'echo ';
else{
emptyLinePrefix = 'echo ""';
commandText = "$Host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size (500, 25)" + "\n" + commandText;
}

return "#!" + headers.shaBang + "\n" +
"#maxlength=100000" + "\n" +
"#timeout=90000" + "\n" +
headers.modifier + "INFORMATIONREQUEST-RESPONSE/0" + headers.delimiter + "\n" +
headers.modifier + "CommandType: " + headers.CommandType + headers.delimiter + "\n" +
headers.modifier + "ContentType: " + headers.ContentType + headers.delimiter + "\n" +
emptyLinePrefix + "\n" + commandText;
}

function getHeaders() {
return { Processor: "ps", Interface: "powershell", ContentType: "xml", shaBang: "ps", modifier: "echo \"", delimiter: '\"' };
}

function isGeneralTab(tabName) {
switch (tabName) {
case 'General':
return true;
default:
return false;
}
}

function isInformationRequestContent(eventData) {
return eventData.startsWith("INFORMATIONREQUEST-RESPONSE/0");
}

function getLatestInformationRequestEvent(sessionDetails, CommandEventType) {
return sessionDetails.Connections
.map(function(c) { return c.Events; })
.reduce(function(outputArray, events) { Array.prototype.push.apply(outputArray, events); return outputArray; }, [])
.filter(function(e) {
return e.EventType === SC.types.SessionEventType.RanCommand &&
isInformationRequestContent(e.Data)
})
.sort(function (x, y) { return x.Time - y.Time; })
[0];
}

function parseDataHeaders(eventData) {
var currentIndex = 0;
var headers = {};
var isStatusLine = true;

while (true) {
var nextNewLineIndex = eventData.indexOf('\n', currentIndex);

if (isStatusLine) {
isStatusLine = false;
} else if (nextNewLineIndex == currentIndex + 2 || nextNewLineIndex < 0) {
break;
} else {
var lineParts = eventData.substring(currentIndex, nextNewLineIndex).split(': ');
headers[lineParts[0]] = lineParts[1];
}
currentIndex = nextNewLineIndex + 1;
}
return headers;
}

function displayInformationRequest(latestCommandEvent, eventArgs) {
if (typeof latestCommandEvent === 'undefined' && !hasSentCommand && window.isCommandEnabled("RunCommand", null, [eventArgs.session], eventArgs.session.Permissions)) {
sendCommand();
hasSentCommand = true;
return;
} else {
var headers = parseDataHeaders(latestCommandEvent.Data);
displayCommandData(getEventDataXml(latestCommandEvent.Data));
}
}

function getEventDataXml(eventData) {
return parseXml(eventData.substring(eventData.indexOf('<?xml'), eventData.length));
}

function displayCommandData(xml) {
var x = xml.getElementsByTagName("Object");
if (isUsingInternetExplorerOrEdge())
{
$('manufacturerValueContainer').innerHTML = x[0].childNodes[0].textContent;
$('modelValueContainer').innerHTML = x[1].childNodes[0].textContent;
$('biosNameValueContainer').innerHTML = x[2].childNodes[0].textContent;
$('biosSerialValueContainer').innerHTML = x[3].childNodes[0].textContent;
//$('BiosAgeValueContainer').innerHTML = x[4].childNodes[0].textContent;
//$('domainNameValueContainer').innerHTML = x[5].childNodes[0].textContent;
//$('DHCPEnabledValueContainer').innerHTML = x[6].childNodes[0].textContent;
//$('DHCPServerValueContainer').innerHTML = x[7].childNodes[0].textContent;
//$('defaultGatewayValueContainer').innerHTML = x[9].childNodes[0].textContent;
$('mediaFriendlyNameValueContainer').innerHTML = x[4].childNodes[0].textContent;
$('mediaSerialNumberValueContainer').innerHTML = x[5].childNodes[0].textContent;
$('mediaSizeValueContainer').innerHTML = x[6].childNodes[0].textContent;
$('mediatypeValueContainer').innerHTML = x[7].childNodes[0].textContent;
$('mediaHealthStatusValueContainer').innerHTML = x[8].childNodes[0].textContent;
$('mediaPredictFailureValueContainer').innerHTML = x[9].childNodes[0].textContent;
$('antivirusValueContainer').innerHTML = x[10].childNodes[0].textContent;
$('internalIPAddressValueContainer').innerHTML = x[11].childNodes[0].textContent;
//$('antispywareValueContainer').innerHTML = x[10].childNodes[0].textContent;

} else {
$('manufacturerValueContainer').innerHTML = x[0].innerHTML;
$('modelValueContainer').innerHTML = x[1].innerHTML;
$('biosNameValueContainer').innerHTML = x[2].innerHTML;
$('biosSerialValueContainer').innerHTML = x[3].innerHTML;
//$('BiosAgeValueContainer').innerHTML = x[4].innerHTML;
//$('domainNameValueContainer').innerHTML = x[5].innerHTML;
//$('DHCPEnabledValueContainer').innerHTML = x[6].innerHTML;
//$('DHCPServerValueContainer').innerHTML = x[7].innerHTML;
//$('defaultGatewayValueContainer').innerHTML = x[9].innerHTML;
$('mediaFriendlyNameValueContainer').innerHTML = x[4].innerHTML;
$('mediaSerialNumberValueContainer').innerHTML = x[5].innerHTML;
$('mediaSizeValueContainer').innerHTML = x[6].innerHTML;
$('mediatypeValueContainer').innerHTML = x[7].innerHTML;
$('mediaHealthStatusValueContainer').innerHTML = x[8].innerHTML;
$('mediaPredictFailureValueContainer').innerHTML = x[9].innerHTML;
$('antivirusValueContainer').innerHTML = x[10].innerHTML;
$('internalIPAddressValueContainer').innerHTML = x[11].innerHTML;
//$('antispywareValueContainer').innerHTML = x[10].innerHTML;
}
}


function parseXml(xml) {
var dom = null;
if (window.DOMParser) {
try {
dom = (new DOMParser()).parseFromString(xml, "text/xml");
}
catch (e) { dom = null; }
}
else if (window.ActiveXObject) {
try {
dom = new ActiveXObject('Microsoft.XMLDOM');
dom.async = false;
if (!dom.loadXML(xml)) // parse error ..
window.alert(dom.parseError.reason + dom.parseError.srcText);
}
catch (e) { dom = null; }
}
else
alert("cannot parse xml string!");
return dom;
}

function isUsingInternetExplorerOrEdge() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf("Trident");

if (ua.indexOf("Trident") > 0 || ua.indexOf("Edge") > 0)
return true;
else
return false;
}

Edited by user Monday, May 7, 2018 9:42:10 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.