Rsm
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
Manages media resources using Removable Storage. Using the rsm command, you can run batch scripts for applications that do not currently support the Removable Storage API.
To allocate media from a media pool
To create a media pool
To deallocate media
To delete a media pool
To dismount media from a drive
To eject media from a library
To eject media from an ATAPI changer
To erase the contents of a tape
To write a free media label on a piece of media and return it to the Free media pool
To inventory the media in a specified automated library
To mount media in the designated library
To refresh a library, physical media, or all devices of a particular media type
To change the friendly name or description of an RSM object
To change the friendly name or description of an RSM object
To set the destination for UI messages
rsm allocate /m MediaPoolName /o{errunavail | new | next} [/l{g | f} LogicalMediaID | /p{g | f}PartitionID] [/lnLogicalMediaName] [/ldLogicalMediaDescription] [/pnPartitionName] [/pdPartitionDescription] [/tTimeout] [/b]
- /m MediaPoolName
Media are allocated from the specified media pool. This means that you will have allocated media in that pool.
- /o
Permits the use of one of the parameters listed in the following table.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>errunavail</strong></p></td>
<td><p>Prevents the submission of an operator request for new media if none can be allocated with the specified constraints.</p></td>
</tr>
<tr class="even">
<td><p><strong>new</strong></p></td>
<td><p>Allocates a partition that cannot be shared with another application. This can be used to reserve the second side of two-sided media.</p></td>
</tr>
<tr class="odd">
<td><p><strong>next</strong></p></td>
<td><p>Allocates the next side of media that was previously allocated using the <strong>new</strong> parameter.</p></td>
</tr>
</tbody>
</table>
- /l{g | f} LogicalMediaID
Specifies the media to be allocated, using the logical media ID. You can use the GUID (with the lg command-line option), or the friendly name (with the lf command-line option). LogicalMediaID specifies the next side of multi-sided media to allocate. This parameter is optional and must be used with the /o command-line option and the next parameter. After deallocating this media, the logical media ID is invalid.
- /p{ g| f} PartitionID
Specifies the partition to be allocated, using the partition ID. You can use the GUID (with the pg command-line option), or the friendly name (with the pf command-line option). This parameter is optional and remains persistent even after the media is deallocated.
- /ln LogicalMediaName
Specifies the friendly name to be assigned to the allocated media’s logical media object.
- /ld LogicalMediaDescription
Specifies the description to be assigned to the allocated media’s logical media object.
- /pn PartitionName
Specifies the friendly name to be assigned to the allocated media’s partition object.
- /pd PartitionDescription
Specifies the description to be assigned to the allocated media’s partition object.
- /t Timeout
Specifies the command time-out, in milliseconds. The default time-out value is infinite.
- /b
Only the GUID for the allocate operation is displayed. This aids in scripting where you want to pass the output of one command to the next with minimal parsing.
- /?
Displays help at the command prompt.
- Logical media names and side names can be used in other commands to specify media as the parameter to the /lf or /pf switch, respectively. If logical media names (which are friendly names) are not used with the allocate command, you can use only GUIDs in subsequent commands to specify logical media.
rsm createpool /m MediaPoolName /a{existing | always | new}[/t{g | f}MediaPoolTypeID][/d][/r]
- /m MediaPoolName
Specifies the name of the media pool to be created.
- /a
Permits the use of one of the parameters listed in the following table.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>existing</strong></p></td>
<td><p>Opens the existing media pool or returns an error if the media pool specified does not exist.</p></td>
</tr>
<tr class="even">
<td><p><strong>always</strong></p></td>
<td><p>Opens the existing media pool or creates a new media pool if not found.</p></td>
</tr>
<tr class="odd">
<td><p><strong>new</strong></p></td>
<td><p>Creates a new media pool or returns an error if the media pool specified already exists.</p></td>
</tr>
</tbody>
</table>
- /tg MediaPoolTypeID
Specifies the type of media the media pool will contain, using the GUID. The default type is a media pool that contains other media pools.
- /tf MediaPoolTypeID
Specifies the type of media the media pool will contain, using the friendly name. The default type is a media pool that contains other media pools.
- /d
Permits the media pool to automatically draw media from the free media pool. If the /d switch is not included, the media pool will not be permitted to draw media from the free media pool.
- /r
Permits the media pool to automatically return media to the free media pool. If the /r switch is not included, the media pool will not be permitted to return media to the free media pool.
- /?
Displays help at the command prompt.
rsm deallocate /l{g | f}LogicalMediaID| /p{g | f}PartitionID
- /lg LogicalMediaID
Specifies the logical media to deallocate, using the GUID.
- /lf LogicalMediaID
Specifies the logical media to deallocate, using the friendly name.
- /pg PartitionID
Specifies the media side to deallocate, using the GUID.
- /pf PartitionID
Specifies the media side to deallocate, using the friendly name.
- /?
Displays help at the command prompt.
- You can use the logical media name or the partition name to specify the logical media to deallocate only if one of these names were specified with the allocate command using the /ln or /pn switch respectively. Otherwise, you must specify either the logical media ID (LMID) or the partition ID (PARTID) instead.
rsm deletepool /m MediaPoolName
- /m MediaPoolName
Specifies the name of the media pool to be deleted.
- /?
Displays help at the command prompt.
rsm dismount {/l{g | f}LogicalMediaID| /p{g | f}PartitionID}[/o[deferred]]
- /lg LogicalMediaID
Specifies the logical media to dismount, using the GUID.
- /lf LogicalMediaID
Specifies the logical media to dismount, using the friendly name.
- /pg PartitionID
Specifies the media side to dismount, using the GUID.
- /pf PartitionID
Specifies the media side to dismount, using the friendly name.
- /o
When used with the optional deferred parameter, this optional switch marks the media as dismountable, but the media is kept in the drive. Subsequent mount commands can be completed normally. If not used, the media is dismounted from the drive immediately.
- /?
Displays help at the command prompt.
- The logical media name or the partition name can be used to specify the logical media to dismount only if one of these names were specified with the allocate command using the /ln or /pn switch, respectively. Otherwise, you must specify either the logical media ID (LMID) or the partition ID (PARTID) instead.
The media to be ejected can be specified in one of four ways:
You can specify the physical media to eject using either the physical-media ID (PMID) or the physical media name.
You can eject the media in a specified slot within a specified library.
You can eject the media in a specified drive within a specified library.
You can eject the media in a standalone drive by specifying either its GUID or friendly name.
rsm eject {/p{g | f}PhysicalMediaID| /s{g | f}SlotID**/l**{g | f}ChangerID/LibraryID| /d{g | f}
DriveID /l{g | f}LibraryID| /l{g | f}StandaloneLibraryID}
[/oEjectOperationID]
[/a{start | stop | queue}]
[/b]
- /pg PhysicalMediaID
Specifies the physical media to eject, using the GUID.
- /pf PhysicalMediaID
Specifies the physical media to eject, using the friendly name.
- /sg SlotID
Specifies the slot holding the media to eject, using the GUID.
- /sf SlotID
Specifies the slot holding the media to eject, using the friendly name.
- /lg LibraryID
Specifies the library containing the media to eject (for a standalone drive), or the library containing the slot or drive from which to eject the media (for an automated library), using the GUID. If you are specifying an automated library, this switch must be used with the /s or /d switch.
- /lf LibraryID
Specifies the library containing the media to eject (for a standalone drive), or the library containing the slot or drive from which to eject the media (for an automated library), using the friendly name. If you are specifying an automated library, this switch must be used with the /s or /d switch.
- /dg DriveID
Specifies the drive holding the media to eject, using the GUID.
- /df DriveID
Specifies the drive holding the media to eject, using the friendly name.
- /o EjectOperationID
Used to specify the GUID for the particular eject operation. The optional /o switch can be used in conjunction with the /a switch and the stop parameter to terminate a particular eject operation. This can also be used in conjunction with the /a switch and the start parameter to display the GUID of the particular eject operation.
- /a
Permits the use of one of the parameters listed in the following table.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>Start</strong></p></td>
<td><p>The default, starts the eject operation immediately. The media is ejected until a time-out occurs, or unless another eject command is issued with the <strong>/a</strong> command-line option and the <strong>stop</strong> parameter. Such eject commands must also specify the eject operation GUID using the <strong>/o</strong> command-line option. The <em>Timeout</em> parameter is specified in the library object (for all eject operations) for the library. To set this <em>Timeout</em> parameter, you must use the Removable Storage API. Can also be used in conjunction with the <strong>/o</strong> switch to display the GUID of a particular eject operation.</p></td>
</tr>
<tr class="even">
<td><p><strong>Stop</strong></p></td>
<td><p>Terminates the eject operation prior to a time-out expiring. The particular eject operation can be determined using the GUID displayed when the <strong>start</strong> parameter is used with the <strong>/a</strong> switch and the <strong>/o</strong> switch.</p></td>
</tr>
<tr class="odd">
<td><p><strong>Queue</strong></p></td>
<td><p>Queues the media for later ejection. This can be used for libraries with multi-slot inject/eject (IE) ports.</p></td>
</tr>
</tbody>
</table>
- /b
Displays only the eject operation GUID for scripting purposes.
- /?
Displays help at the command prompt.
rsm ejectatapi /n AtapiChangerNumber
- /n AtapiChangerNumber
Specifies the changer number. AtapiChangerNumber is the number found at the end of the string for the device name of the changer. For example, \\.\CdChanger0 has 0 as the ATAPI changer number.
- /?
Displays help at the command prompt.
- Before you run this command, manually stop the ntmssvc service.
rsm erase /p{g | f}PhysicalMediaID[**/**tTimeout]
[/r{normal | high | low | highest | lowest}][/b]
- /pg PhysicalMediaID
Specifies the tape to erase, using the GUID.
- /pf PhysicalMediaID
Specifies the tape to erase, using the friendly name.
- /t Timeout
Specifies the command time-out, in milliseconds. The default time-out value is infinite.
- /r{ normal| high| low| highest| lowest}
Optionally specifies the priority with which RSM is to perform the mount operation for the purposes of erasing the tape, with normal being the default.
- /b
Hides the text on completion, for scripting purposes.
- /?
Displays help at the command prompt.
rsm freemedia {/p{g | f}PhysicalMediaID| /s{g | f}SlotID**/l**{g | f}ChangerID/LibraryID| /d{g | f}DriveID**/l**{g | f}ChangerID/library| /l{g | f}StandaloneLibraryID[/b]
- /pg PhysicalMediaID
Specifies the physical media to free, using the GUID.
- /pf PhysicalMediaID
Specifies the physical media to free, using the friendly name.
- /sg SlotID
Specifies the slot holding the media to free, using the GUID.
- /sf SlotID
Specifies the slot holding the media to free, using the friendly name.
- /lg LibraryID
Specifies the library containing the media to free (for a standalone drive), or the library containing the slot or drive from which to eject the media (for an automated library), using the GUID. If you are specifying an automated library, this switch must be used with the /s or /d switch.
- /lf LibraryID
Specifies the library containing the media to free (for a standalone drive), or the library containing the slot or drive from which to eject the media (for an automated library), using the friendly name. If you are specifying an automated library, this switch must be used with the /s or /d switch.
- /dg DriveID
Specifies the drive holding the media to free, using the GUID.
- /df DriveID
Specifies the drive holding the media to free, using the friendly name.
- /b
Displays only the eject operation GUID, for scripting purposes.
- /?
Displays help at the command prompt.
You can specify the media to be freed in one of four ways:
You can specify the physical media using either the physical media ID (PMID) or the physical media name.
You can write a free media label on the media in a specified slot within a specified library.
You can write a free media label on the media in a specified drive within a specified library.
You can free the media in a standalone drive by specifying its library GUID or friendly name.
**rsm inventory /**l{g | f}*LibraryID/*a{full | fast | default | none | stop}
- /lf LibraryID
Specifies the library to inventory, using the friendly name.
- /lg LibraryID
Specifies the library to inventory, using the GUID.
- /a{ full| fast| default| none| stop}
Required. Specifies the type of inventory operation to perform. The following table lists valid inventory operations.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>full</strong></p></td>
<td><p>Performs a full on-media inventory of the library. Removable Storage mounts each tape or disk in the library and reads the on-media identifier.</p></td>
</tr>
<tr class="even">
<td><p><strong>fast</strong></p></td>
<td><p>Performs a bar code inventory, if the specified library has a bar code reader installed. If the library has no bar code reader, Removable Storage checks the storage slots and reads the on-media identifier on media in slots that were previously empty.</p></td>
</tr>
<tr class="odd">
<td><p><strong>default</strong></p></td>
<td><p>Performs an inventory using the default method specified in the library's <strong>Properties</strong> dialog box.</p></td>
</tr>
<tr class="even">
<td><p><strong>none</strong></p></td>
<td><p>Performs no inventory.</p></td>
</tr>
<tr class="odd">
<td><p><strong>stop</strong></p></td>
<td><p>Stops the current inventory for the specified library, if one is being performed.</p></td>
</tr>
</tbody>
</table>
- /?
Displays help at the command prompt.
The logical media to be mounted can be specified using either the logical-media ID (LMID) or the logical media name.
rsm mount {/l{g | f}LogicalMediaID| /p{g | f}PartitionID|[/s{g | f}SlotID**/c**{g | f}ChangerID}
[/d{g | f}DriveID]/o{errunavail | drive | read | write | offline}
[/r{normal | high | low | highest | lowest}][/tTimeout]
- /pf PartitionID
Specifies the media side to mount, using the friendly name.
- /lf LogicalMediaID
Specifies the logical media to mount, using the friendly name.
- /pg PartitionID
Specifies the media side to mount, using the GUID.
- /lg LogicalMediaID
Specifies the logical media to mount, using the GUID.
- /cg ChangerID
Specifies the changer that contains the media to be mounted, using the GUID. This can only be used in conjunction with the /sg switch and the slot GUID, or the /sf switch and the slot friendly name.
- /cf ChangerID
Specifies the changer that contains the media to be mounted, using the friendly name. This can only be used in conjunction with the /sg switch and the slot GUID, or the /sf switch and the slot friendly name.
- /sg SlotID
Specifies the media slot that contains the media to be mounted, using the GUID. This can only be used with the /cg switch and the changer GUID, or the /cf and the changer friendly name.
- /sf SlotID
Specifies the media slot that contains the media to be mounted, using the friendly name. This can only be used with the /cg switch and the changer GUID, or the /cf and the changer friendly name.
- /dg DriveID
Specifies the particular drive on which to mount the applicable media, using the GUID. This parameter is optional, and must be used in conjunction with the /o switch and the drive parameter.
- /df DriveID
Specifies the particular drive on which to mount the applicable media, using the friendly name. This parameter is optional, and must be used in conjunction with the /o switch and the drive parameter.
- /o{ errunavail | drive| read | write| offline}
Permits the use of one of the parameters listed in the following table.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>errunavail</strong></p></td>
<td><p>Generates an error if either the media or the drive is unavailable.</p></td>
</tr>
<tr class="even">
<td><p><strong>drive</strong></p></td>
<td><p>Specifies that a particular drive is to be mounted. This parameter is used in conjunction with the <strong>/d</strong> switch.</p></td>
</tr>
<tr class="odd">
<td><p><strong>read</strong></p></td>
<td><p>Mounts the media for read access.</p></td>
</tr>
<tr class="even">
<td><p><strong>write</strong></p></td>
<td><p>Mounts the media for write access. If this parameter is used, completed media will not be mounted.</p></td>
</tr>
<tr class="odd">
<td><p><strong>offline</strong></p></td>
<td><p>Generates an error if the media is offline.</p></td>
</tr>
</tbody>
</table>
- /r{ normal | high | low | highest | lowest}
Optionally specifies the mount order, or priority. Mount priority may also be specified using one of the listed parameters, normal (the default), high, low, highest, or lowest.
- /t Timeout
Optionally specifies the command time-out, in milliseconds. The default time-out is infinite.
- /?
Displays help at the command prompt.
- When using the mount command, you can specify the media to be mounted using either the /l switch, the /p switch, or a combination of the /s switch and the /c switch.
This command causes a single poll of the target devices so that the Removable Storage database contains the current state of the device. This command can be useful after media insert or eject operations.
rsm refresh {/l{g | f}LibraryID| /p{g | f}PhysicalMediaID| **/**tgMediaTypeID}
- /lg LibraryID
Specifies the library to refresh, using the GUID.
- /lf LibraryID
Specifies the library to refresh, using the friendly name.
- /pg PhysicalMediaID
Specifies the physical media to refresh, using the GUID.
- /pf PhysicalMediaID
Specifies the physical media to refresh, using the friendly name.
- /tg MediaTypeID
Specifies the media type to be refreshed. Only the GUID can be specified. This parameter can be used to refresh all removable media devices by specifying the GUID for the removable media. This GUID can be determined using the view command as follows: rsm view /tmedia_type /guiddisplay.
- /?
Displays help at the command prompt.
rsm rename /t{drive | library | changer | storageslot | iedoor | ieport | physical_media | media_pool | partition | logical_media | media_type | drive_type | librequest | oprequest | computer} {/f | /g}ObjectID /nNewName
[/dNewDescription][/b]
- /t{drive | library | changer | storageslot | iedoor | ieport | physical_media | media_pool | partition | logical_media | media_type | drive_type | librequest | oprequest | computer}
Indicates the type of RSM object you are specifying with its friendly name or GUID.
- /f ObjectID
Specifies the object to be renamed, using its friendly name.
- /g ObjectID
Specifies the object to be renamed, using its GUID.
- /n NewName
Specifies the new name for the RSM object.
- /d NewDescription
Specified the new description for the RSM object.
- /b
Hides the text on completion, for scripting purposes.
- /?
Displays help at the command prompt.
rsm view /t{drive | library | changer | storageslot | iedoor | ieport | physical_media | media_pool | partition | logical_media | media_type | drive_type | librequest | oprequest | computer | ui_destination}
[/cgContainerID][/uUIType][/guiddisplay][/desc][/b]
- /t {drive | library | changer | storageslot | iedoor | ieport | physical_media | media_pool | partition | logical_media | media_type | drive_type | librequest | oprequest | computer | ui_destination}
Displays a list of media objects of the specified type.
- /cg ContainerID
Specifies the GUID for the object container. The type of container depends on the object type (parameter) specified with the /t switch. If the container ID is not specified, all instances of the applicable object type are displayed.
- /u UIType
When used with the /tui_destination and /cg switches, displays the destinations to which UI messages of the specified type are directed. The type can be one of three parameters:
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>info</strong></p></td>
<td><p>Informational messages</p></td>
</tr>
<tr class="even">
<td><p><strong>req</strong></p></td>
<td><p>Messages that are "requesting" in nature</p></td>
</tr>
<tr class="odd">
<td><p><strong>err</strong></p></td>
<td><p>Error messages</p></td>
</tr>
</tbody>
</table>
- /guiddisplay
Displays both the GUID and the friendly name for objects.
- /desc
Displays the objects' description.
- /b
Displays only the object GUID for scripting purposes.
- /?
Displays help at the command prompt.
If the /guiddisplay switch and the /b switch are not used, only the friendly names for objects are displayed.
You must use the /cg and /u switches when you specify ui_destination as the object type for the /t switch. Moreover, the ContainerID specified with the /cg switch must be a valid library or computer GUID. If /guiddisplay or /desc are specified, they are ignored.
rsm ui /o Operation /t UIType /{l | c}{f | g}ContainerID
[/dDestination][/b]
- /o Operation
Specifies whether to add or remove items from the list of destinations, using one of the parameters in the following table.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th><strong>Value</strong></th>
<th><strong>Description</strong></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>add</strong></p></td>
<td><p>Adds a new destination (computer name) to the list.</p></td>
</tr>
<tr class="even">
<td><p><strong>delete</strong></p></td>
<td><p>Removes an existing destination from the list.</p></td>
</tr>
<tr class="odd">
<td><p><strong>deleteall</strong></p></td>
<td><p>Clears the entire destination list. When the destination list is empty, UI messages of the type specified by the <strong>/t</strong> swtich will not appear on any computer.</p></td>
</tr>
</tbody>
</table>
- /t UIType
Specifies the type of message for which you are setting the destination, using one of the parameters in the following table.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th><strong>Value</strong></th>
<th><strong>Description</strong></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>INFO</strong></p></td>
<td><p>Informational messages</p></td>
</tr>
<tr class="even">
<td><p>REQ</p></td>
<td><p>Messages that are "requesting" in nature</p></td>
</tr>
<tr class="odd">
<td><p>ERR</p></td>
<td><p>Error messages</p></td>
</tr>
</tbody>
</table>
- /cg ContainerID
Specifies the computer object for which you are redirecting messages of the type specified by /t, using the object's GUID.
- /cf ContainerID
Specifies the computer object for which you are redirecting messages of the type specified by /t, using the object's friendly name.
- /lg ContainerID
Specifies the library object for which you are redirecting messages of the type specified by /t, using the object's GUID.
- /lf ContainerID
Specifies the library object for which you are redirecting messages of the type specified by /t, using the object's friendly name.
- /d Destination
Specifies the computer to which you are redirecting messages. If omitted, the local computer is used.
- /b
Hides the text on completion, for scripting purposes.
- /?
Displays help at the command prompt.
If a command succeeds, then the code ERROR_SUCCESS is returned. All commands that fail return an error code, which can be used for scripting purposes. The error code is either a system-defined error code or one of the error codes listed in the following table.
Error code Description 536870913
Invalid arguments were specified. Frequently, this is caused by a space after an argument switch, for example, /t 50 instead of /t50.
536870914
Duplicate argument switches were specified. For example, the allocate command used with two /m switches.
536870915
No GUID matches the friendly name that was specified. Check capitalization because friendly names are case-sensitive.
536870916
An insufficient number of argument switches were specified. Check to see if a required switch is missing.
536870917
An invalid GUID was specified. Use the view command to determine the correct GUID for an object.
536870918
This is returned only by the ejectatapi command. Verify that the ATAPI changer is functioning correctly.
536870919
No match was found for the specified drive object. Use the view command to determine the correct friendly name or GUID for the drive.
536870920
No match was found for the specified slot object. Use the view command to determine the correct friendly name or GUID for the slot.
Format | Meaning |
---|---|
Italic |
Information that the user must supply |
Bold |
Elements that the user must type exactly as shown |
Ellipsis (...) |
Parameter that can be repeated several times in a command line |
Between brackets ([]) |
Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} |
Set of choices from which the user must choose only one |
|
Code or program output |
Command-line reference A-Z
Command shell overview
Removable Storage overview
Understanding Removable Storage
Using Removable Storage