< Back

New-Database

Sat Jan 11, 2020 3:47 am

NAME New-Database



SYNOPSIS

Create a new database





SYNTAX

New-Database [-DatabaseName] <Object> [-ConnectionString] <Object> [<CommonParameters>]





DESCRIPTION

Create a new Local DB database on the connectionString





PARAMETERS

-DatabaseName <Object>

The name of the database to create



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ConnectionString <Object>

SQL Connection String pointing to the master database



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<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



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>New-LocalDbDatabase -DatabaseName "MyDb" -ConnectionString "servername='server'"



Creates the databse 'MyDb' on the specified connection string











RELATED LINKS

Questions about this script: rick@chroomsoft.nl