Article: AN0002429Updated: 25.05.2020
This function returns a list of server disks including their total, used and free capacity. The list of servers is obtained from LDAP (Microsoft Active Directory).
The output file can be used to import data into entity Filesystem (Disks).
Main prerequisites for use
Prerequisite |
Description |
Module Active Directory PowerShell Microsoft
|
In order to read information about users from LDAP it is necessary to install Powershell module for Active Directory. |
Remote Differential Compression |
In order to read information about users from LDAP it is necessary to enable this function of the Windows system on server executing this functionality. |
AD DS and AD LDS Tools |
In order to read information about users from LDAP it is necessary to enable this function of the Windows system on server executing this functionality. |
Powershell v3 |
Microsoft Powershell version 3 or higher. |
Description
Function creates a text file containing information about servers according to configuration.
Name of the column header |
Description |
Server Name |
Name of the server. |
Domain Name |
Name of the domain which the server belongs to. |
DNS Host Name |
Name of the server in DNS. |
Disk Name |
Name of the disk. |
Total[GB] |
Total disk capacity in GB. |
Used[GB] |
Used disk capacity in GB. |
Free[GB] |
Free disk capacity in GB. |
Parameters
Include hereinafter stated parameters in the file og_configuration.ps1 (generic parameters shared with other functions) or in the file OG_PC-Start.config (specific parameters of this function). Parameter configuration is described in the documentation of the programme Piklo.
Parameter |
Description |
Example |
[string]$LogFile |
Path to the file, in which log of the function shall be stored. |
[string]$LogFile = "\\servername\OGoutput\Disks\LogFile.txt" |
[string]$OutFile |
Path to the file, in which log of the function shall be stored. |
[string]$LogFile = "\\servername\OGoutput\Disks\OutFile.txt"
|
[string]$OutFileEncoding |
Coding of the output file. Possible options are "UTF8", "Unicode", "ANSI" and "DEFAULT". The value "DEFAULT" makes the file being created in the ANSI encoding. |
[string]$OutFileEncoding = "UTF8"
|
[string]$Delimiter |
Delimiter [ ";" | "t" | "," ] - Value separator in the records. |
[string]$Delimiter = ";" |
[string]$HeaderOutFile |
Defines, wheather the output file shall include header with column names ("1") or not ("0"). |
[string]$HeaderOutFile = "1" |
Call
The function is called by means of the programme Piklo, that is part of ObjectGears package, from ObjectGears script. Result of the call has to be assigned to a variable, with which the script can further work.
a = OG.Process.RunPiklo('OG_Server-Disks','-type C')