Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
Creating a script
In the SA Client, you can create a script from either the By Type or the By Folder view in the Library.
- Guidelines
- Creating a script from the By Type view in the library
- Creating a script from the By Folder view in the library
Guidelines
Server Automation supports the following types of Server scripts for UNIX and Windows operating systems: UNIX/Linux shell, Windows batch (.BAT), Windows Visual Basic (VBScript), Windows PowerShell and Python (.py). Python scripts can be executed on both Unix and Windows .
When creating scripts you must adhere to the following guidelines:
4 MB is the maximum size allowable for a script.
When you create a UNIX shell script with a language other than the Bourne (sh) shell, use the sh-bang (#!) format at the top of the script to specify the correct command interpreter. The command interpreter needs to be present on the managed server.
For example, if you are using Perl, the beginning of the script would contain the following line:
#!/usr/bin/perl
The following example shows a short Perl script (it displays “hello world”):
#!/usr/bin/perl
print “hello world\n”
VBScripts are executed by the VBScript interpreter on the Windows server.
To access command line parameters with UNIX shell commands, use the following convention: $1 $2...
To access command line parameters with Windows .BAT, use: %1 %2...
Script lines do not need to be terminated in a specific way. But with Windows scripts, Server Automation converts all \n
to \r\n
. With UNIX scripts, all \r\n
are converted to \n
.
Scripts should be written to send error output to standard error.
Scripts should use the standard convention of returning a zero code to indicate success. For other return codes, there is no standard code system to follow. Create unique non-zero return codes to handle each type of error.
Creating a script from the By Type view in the library
To create a script:
- From the Navigation pane, select Library > By Type > Scripts.
- Select the script type and from the Actions menu, select New. The Script window appears as shown in the following figure.
Script window - In the Name field, enter the name of the script.
- (Windows only) Select the script type from the Type drop-down list.
- Click Select to specify the location for the script in the folder hierarchy. The Select Folder window appears. Select a folder in the Library to specify the location of the script and then click Select.
- In the Changes Server field, select Yes, if the script causes a change in the server configuration when executed.
- In the Run as Super User field, select Yes if the script can be run as a Super User when executed. Selecting yes, allows you to run the script as a Super User without providing a password for the script.
This option is enabled only if you have to appropriate permission. See the SA 10.50 Administration Guide for more information about script execution permissions. - In the Script Contents field, enter the contents of the script or click Import Script File to import a script.
If you import a script that uses Unicode (UTF8) encoding and your computer's regional language settings are set to English, and then you export the script and attempt to execute it, you may encounter errors because Unicode (UTF8) encoding may add a "." or other special character at the beginning of the script. If this occurs, simply edit the script to remove the extraneous characters. - In the Description field, enter text that describes the purpose or contents of the script.
- To save the changes, select Save from the File menu.
Creating a script from the By Folder view in the library
To create a script perform the following steps:
- From the Navigation pane, select Library > By Folder. The folder hierarchy in the Library appears in the Content pane.
- Select the folder that should contain the script.
- From the Actions menu, select New > Script. The Script window appears.
- In the Name field, enter the name of the script.
- Select the script type from the Type drop-down list.
- Click Select to change the location for the script in the folder hierarchy. The Select Folder window appears. Select a folder in the Library to specify the location of the script and then click Select.
- In the Changes Server field, select Yes, if the script causes a change in the server configuration when executed.
- In the Run as Super User field, select yes if the script can be run as a Super user when executed. OGFS Scripts can only be executed as an SA User.
This option is enabled only if you have to appropriate permission. See the SA 10.50 Administration Guide for more information about script execution permissions. - In the Script Contents filed, enter the contents of the script or click Import Script File to import a script. In the Open window, select the script to import and then click Open.
If you import a script that uses Unicode (UTF8) encoding and your computer's regional language settings are set to English, and then you export the script and attempt to execute it, you may encounter errors because Unicode (UTF8) encoding may add a "." or other special character at the beginning of the script. If this occurs, simply edit the script to remove the extraneous characters. - In the Description field, enter text that describes the purpose or contents of the script.
- To save the changes, select Save from the File menu.
The Library in the SA Client contains a Home directory and each user has a folder in the Home directory. You can save private scripts in this folder and later execute the script on managed servers.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to hpe_sa_docs@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: