Users Guide
To read the secure password from the file and assign it to a variable:
PS> $passwordFile = convert-path c:\tmp\password.txt
PS> $wsmanpassword = Get-Content $passwordFile | ConvertTo-SecureString
To use the secure string in all the password variables in the OpenManage Essentials CLI commands:
PS> Add-DiscoveryRange -Range 10.36.0.48 -Profile samples\DiscoveryProfile.xml -
WSManPassword $wsmanpassword
An example of the profile.xml file is outlined as follows:
<?xml version="1.0" encoding="utf-8" ?>
<DiscoveryConfiguration>
<NetMask>
255.255.255.240
</NetMask>
<ICMPConfiguration>
<Timeout>400</Timeout>
<Retries>1</Retries>
</ICMPConfiguration>
<SNMPConfig Enable="True">
<GetCommunity>public</GetCommunity>
<SetCommunity></SetCommunity>
<Timeout>400</Timeout>
<Retries>2</Retries>
</SNMPConfig>
<WMIConfig Enable="False">
<UserName>Administrator</UserName>
</WMIConfig>
<StoragePowerVaultConfig Enable="False"></StoragePowerVaultConfig>
<StorageEMCConfig Enable="False">
<UserName>Administrator</UserName>
<Port>443</Port>
</StorageEMCConfig>
<WSManConfig Enable="False">
<Userid></Userid>
<Timeout>2</Timeout>
<Retries>4</Retries>
<Port>623</Port>
<SecureMode Enable="False" SkipNameCheck="False" TrustedSite="False">
<CertificateFile>Certificate.crt</CertificateFile>
</SecureMode>
</WSManConfig>
<IPMIConfig Enable="False">
<UserName></UserName>
<KGkey></KGkey>
<Timeout>5</Timeout>
<Retries>2</Retries>
</IPMIConfig>
<SSHConfig Enabled="True">
<UserName>Administrator</UserName>
<Timeout>5</Timeout>
<Retries>2</Retries>
<Port>400</Port>
</SSHConfig>
</DiscoveryConfiguration>
NOTE: If you discovered iDRAC using WS-Man and if you are using secure mode where a certificate
file is required to be on the local system, specify the entire path to the certificate file. For example,
c:\192.168.1.5.cer.
318