The Dell iDRAC Powershell library follows in the footsteps of the iLO Powershell Library I wrote earlier this month. to use the code, all you need to do it put a .”\path\to\RACLibrary.ps1″ in the start of any scripts that you intend to use the functions in.
Please do not forget to set the $username and $pass in your scripts – these variables are used by the Library as the login username and password for the RAC Interfaces. I recommend that for security you set these variable by passing in as a command-line argument.
There are only few major functions in this library you need to be concerned with.
All other set- functions roll up a number of set-RACConfig commands into one function with a nice output. If I have not created a function here, it is probably because:
- Too Many Input variables – too complex a function
- Not enough configuration objects in group to warrant it’s own function
- Some things really should be done RACConfigFromFile to ensure no typos (Directory configuration for example).
- Some settings not commonly altered.
Please be aware that RACConfigFromFile is the fastest way to configure iDRACs but you Don’t get a lot of detail about application of Configuration. set-RACConfig will give you more granular details of configuration setting but is exponentially slower as it has to run the racadm.exe tool for each object being configured. This is the tradeoff
you need to consider for writing your scripts.
2012-01-23 1.0 Initial Release
get-RACConfig [string]$hostname, [string]$RACConfigGroup, [int]$RACIndex
Gets the DRAC Config from the specified RAC Configuration Group and returns as an Object If $RACIndex (optional) is specified, will return Configuration from Specific Config Index Number
set-RACConfigFromFile ([string]$hostname, [string]$RACConfigFile)
Sets the DRAC Configuration based on Configuration file $RACConfigFile Output of command returned as an Array of objects
set-RACConfig [string]$hostname, [string]$RACConfigGroup, [string]$RACConfigObject, [string]$RACConfigValue, [int]$RACIndex
Sets the DRAC Configuration Object based on Config Group, Object and Value supplied. If $RACIndex (Optional) is set, Configuration will be applied to the particular index number. This is the major function of the library, and many other functions rely on it.
set-RACNetworkIPv4 [string]$hostname,[string]$RACIP, [string]$RACNetmask,[string]$RACGateway
Configure basic IPv4 Settings for DRAC, including IP, Netmask and IP Gateway
Configure DNS Settings for DRAC interface
set-RACNetworkVLAN [string]$hostname, [int]$RACVLANEnable, [int]$RACVLANID, [int]$RACVLANPri
Configure VLAN Settinsg for DRAC Interface
Configure Syslog Settings for DRAC Interface
Configure TFTP Settings for DRAC Interface
set-RACEmailAlert [string]$hostname,[int]$RACEmailIndex, [int]$RACEmailAlertEnabled,[string]$RACEmailAlertAddress,[string]$RACEMailAlertCustomMsg
Configure RAC Email Alert Settings. Index required
set-RACSNMP [string]$hostname,[int]$RACSNMPEnable, [string]$RACSNMPCommunity
Configure SNMP Settings for DRAC
set-RACSSLInfo [string]$hostname,[int]$RACSSLIndex,[int]$RACSSLKeySize, [string]$RACSSLCN,[string]$RACSSLOrgName,[string]$RACSSLOU,[string]$RACSSLLocality, [string]$RACSSLState, [string]$RACSSLCountry, [string]$RACSSLEmail
Configure the SSL Certificate information for DRAC Interface
Test-RACAlerts [string]$hostname, [int]$RACAlertIndex
Test the Email and SNMP Alert functionality of the DRAC and return results as an object