| external help file | MySQLite-help.xml |
|---|---|
| Module Name | mySQLite |
| online version | https://bit.ly/3aR8NCO |
| schema | 2.0.0 |
Create a new SQLite database file
New-MySQLiteDB [-Path] <String> [-Force] [-Comment <String>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]This command will create a new SQLite database file. It won't create any tables other than a Metadata table with information about who created the database and when. You can use the -Comment parameter to include a description or additional information into the Metadata table.
PS C:\> New-MySQLiteDB c:\work\test.dbCreate a new database file in C:\Work.
PS C:\> New-MySQLiteDB c:\work\test2.db -Comment "This is for scripting stuff" -PassThru -force | Invoke-MySQLiteQuery -query "Select * from metadata"
Author Created Computername Comment
------ ------- ------------ -------
THINKX1-JH\Jeff 7/20/2022 12:34:39 PM THINKX1-JH This is for scripting stuffCreate a new database file in C:\Work and add a comment. Overwrite the file if it already exists and send the result to Invoke-MySQLiteQuery to display metadata information.
Enter a comment to be inserted into the database's metadata table.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseType: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseType: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe path to the SQLite database file. The file name must have one of the following extensions: .db | .db3 | .s3db | .sl3 | .sqlite | .sqlite3
Type: String
Parameter Sets: (All)
Aliases: database
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/