< Back

Rename-MdbcCollection

Sat Jan 18, 2020 11:33 am

NAME Rename-MdbcCollection



SYNOPSIS

Renames collections.





SYNTAX

Rename-MdbcCollection [-Name] <String> [-NewName] <String> [-Database <IMongoDatabase>] [-Force]

[<CommonParameters>]





DESCRIPTION

This cmdlet renames the specified collection in the database, either default (the variable $Database) or specified

by the parameter Database.





PARAMETERS

-Name

Specifies the old collection name.



Required? true

Position? 0

Default value

Accept pipeline input?

Accept wildcard characters?



-NewName

Specifies the new collection name.



Required? true

Position? 1

Default value

Accept pipeline input?

Accept wildcard characters?



-Database

Database instance. If it is omitted then the variable $Database is used. It is obtained by Connect-Mdbc,

Get-MdbcDatabase, or using the driver API.



Required? false

Position? named

Default value

Accept pipeline input?

Accept wildcard characters?



-Force

Tells to allow renaming if the target collection exists.



Required? false

Position? named

Default value

Accept pipeline input?

Accept wildcard characters?



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS

Connect-Mdbc