Computer and Software Support


Rsm

This page is from Microsoft

Updated: January 21, 2005

To allocate media from a media pool

 
Syntax
rsm allocate /mMediaPoolName/o{errunavail | new | next} [/l{g | f} LogicalMediaID | /p{g | f}PartitionID] [/lnLogicalMediaName] [/ldLogicalMediaDescription] [/pnPartitionName] [/pdPartitionDescription] [/tTimeout] [/b]
Parameters
/mMediaPoolName
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.ValueDescriptionerrunavailPrevents the submission of an operator request for new media if none can be allocated with the specified constraints.newAllocates a partition that cannot be shared with another application. This can be used to reserve the second side of two-sided media.nextAllocates the next side of media that was previously allocated using the new parameter.
/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.
/lnLogicalMediaName
Specifies the friendly name to be assigned to the allocated media’s logical media object.
/ldLogicalMediaDescription
Specifies the description to be assigned to the allocated media’s logical media object.
/pnPartitionName
Specifies the friendly name to be assigned to the allocated media’s partition object.
/pdPartitionDescription
Specifies the description to be assigned to the allocated media’s partition object.
/tTimeout
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.
Remarks
  • 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.

To create a media pool

 
Syntax
rsm createpool /mMediaPoolName /a{existing | always | new}[/t{g | f}MediaPoolTypeID][/d][/r]
Parameters
/mMediaPoolName
Specifies the name of the media pool to be created.
/a
Permits the use of one of the parameters listed in the following table. ValueDescriptionexistingOpens the existing media pool or returns an error if the media pool specified does not exist.alwaysOpens the existing media pool or creates a new media pool if not found.newCreates a new media pool or returns an error if the media pool specified already exists.
/tgMediaPoolTypeID
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.
/tfMediaPoolTypeID
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.

To deallocate media

 
Syntax
rsm deallocate /l{g | f}LogicalMediaID| /p{g | f}PartitionID
Parameters
/lgLogicalMediaID
Specifies the logical media to deallocate, using the GUID.
/lfLogicalMediaID
Specifies the logical media to deallocate, using the friendly name.
/pgPartitionID
Specifies the media side to deallocate, using the GUID.
/pfPartitionID
Specifies the media side to deallocate, using the friendly name.
/?
Displays help at the command prompt.
Remarks
  • 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.

To delete a media pool

 
Syntax
rsm deletepool /mMediaPoolName
Parameters
/mMediaPoolName
Specifies the name of the media pool to be deleted.
/?
Displays help at the command prompt.

To dismount media from a drive

 
Syntax
rsm dismount {/l{g | f}LogicalMediaID| /p{g | f}PartitionID}[/o[deferred]]
Parameters
/lgLogicalMediaID
Specifies the logical media to dismount, using the GUID.
/lfLogicalMediaID
Specifies the logical media to dismount, using the friendly name.
/pgPartitionID
Specifies the media side to dismount, using the GUID.
/pfPartitionID
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.
Remarks
  • 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.

To eject media from a library

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.
Syntax
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]

Parameters
  Term
 

To eject media from an ATAPI changer

 
Syntax
rsm ejectatapi /nAtapiChangerNumber
Parameters
/nAtapiChangerNumber
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.
Remarks
  • Before you run this command, manually stop the ntmssvc service.

To erase the contents of a tape

 
Syntax
rsm erase /p{g | f}PhysicalMediaID[/tTimeout]

[/r{normal | high | low | highest | lowest}][/b]

Parameters
/pgPhysicalMediaID
Specifies the tape to erase, using the GUID.
/pfPhysicalMediaID
Specifies the tape to erase, using the friendly name.
/tTimeout
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.

To write a free media label on a piece of media and return it to the Free media pool

 
Syntax
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]
Parameters
/pgPhysicalMediaID
Specifies the physical media to free, using the GUID.
/pfPhysicalMediaID
Specifies the physical media to free, using the friendly name.
/sgSlotID
Specifies the slot holding the media to free, using the GUID.
/sfSlotID
Specifies the slot holding the media to free, using the friendly name.
/lgLibraryID
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.
/lfLibraryID
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.
/dgDriveID
Specifies the drive holding the media to free, using the GUID.
/dfDriveID
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.
Remarks
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

To inventory the media in a specified automated library

 
Syntax
rsm inventory /l{g | f}LibraryID/a{full | fast | default | none | stop}
Parameters
/lfLibraryID
Specifies the library to inventory, using the friendly name.
/lgLibraryID
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. ValueDescriptionfullPerforms a full on-media inventory of the library. Removable Storage mounts each tape or disk in the library and reads the on-media identifier.fastPerforms 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.defaultPerforms an inventory using the default method specified in the library's Properties dialog box.nonePerforms no inventory.stopStops the current inventory for the specified library, if one is being performed.
/?
Displays help at the command prompt.

To mount media in the designated library

The logical media to be mounted can be specified using either the logical-media ID (LMID) or the logical media name.
Syntax
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]

Parameters
/pfPartitionID
Specifies the media side to mount, using the friendly name.
/lfLogicalMediaID
Specifies the logical media to mount, using the friendly name.
/pgPartitionID
Specifies the media side to mount, using the GUID.
/lgLogicalMediaID
Specifies the logical media to mount, using the GUID.
/cgChangerID
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.
/cfChangerID
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.
/sgSlotID
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.
/sfSlotID
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.
/dgDriveID
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.
/dfDriveID
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. ValueDescriptionerrunavailGenerates an error if either the media or the drive is unavailable.driveSpecifies that a particular drive is to be mounted. This parameter is used in conjunction with the /d switch.readMounts the media for read access.writeMounts the media for write access. If this parameter is used, completed media will not be mounted.offlineGenerates an error if the media is offline.
/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.
/tTimeout
Optionally specifies the command time-out, in milliseconds. The default time-out is infinite.
/?
Displays help at the command prompt.
Remarks
  • 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.

To refresh a library, physical media, or all devices of a particular media type

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.
Syntax
rsm refresh {/l{g | f}LibraryID| /p{g | f}PhysicalMediaID| /tgMediaTypeID}
Parameters
/lgLibraryID
Specifies the library to refresh, using the GUID.
/lfLibraryID
Specifies the library to refresh, using the friendly name.
/pgPhysicalMediaID
Specifies the physical media to refresh, using the GUID.
/pfPhysicalMediaID
Specifies the physical media to refresh, using the friendly name.
/tgMediaTypeID
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.

To change the friendly name or description of an RSM object

 
Syntax
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]

Parameters
/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.
/fObjectID
Specifies the object to be renamed, using its friendly name.
/gObjectID
Specifies the object to be renamed, using its GUID.
/nNewName
Specifies the new name for the RSM object.
/dNewDescription
Specified the new description for the RSM object.
/b
Hides the text on completion, for scripting purposes.
/?
Displays help at the command prompt.

To display a list of media objects or UI destinations

 
Syntax
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]

Parameters
/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.
/cgContainerID
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.
/uUIType
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: ValueDescriptioninfoInformational messagesreqMessages that are "requesting" in natureerrError messages
/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.
Remarks
  • 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.

To set the destination for UI messages

 
Syntax
rsm ui /oOperation /tUIType /{l | c}{f | g}ContainerID

[/dDestination][/b]

Parameters
/oOperation
Specifies whether to add or remove items from the list of destinations, using one of the parameters in the following table. ValueDescriptionaddAdds a new destination (computer name) to the list.deleteRemoves an existing destination from the list.deleteallClears the entire destination list. When the destination list is empty, UI messages of the type specified by the /t swtich will not appear on any computer.
/tUIType
Specifies the type of message for which you are setting the destination, using one of the parameters in the following table. ValueDescriptionINFOInformational messagesREQMessages that are "requesting" in natureERRError messages
/cgContainerID
Specifies the computer object for which you are redirecting messages of the type specified by /t, using the object's GUID.
/cfContainerID
Specifies the computer object for which you are redirecting messages of the type specified by /t, using the object's friendly name.
/lgContainerID
Specifies the library object for which you are redirecting messages of the type specified by /t, using the object's GUID.
/lfContainerID
Specifies the library object for which you are redirecting messages of the type specified by /t, using the object's friendly name.
/dDestination
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.
Remarks
  • 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.

Formatting legend

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
Courier font Code or program output