Project has moved to github: https://github.com/weggetor/BBScripts !!


Project Description

 

BBScriptsThe bitboxx bbscripts Powershell scripts support the daily maintenance tasks with DNN installation ! Installation of a new website, Backup and Restore or upgrading a website is only calling one script now!

 


Whats new ?

Version 01.00.00 (17.12.2014):

  • Initial release

Description

Copy the scripts to a folder of your choice (e.g. C:\Scripts).

To call a script you change to this folder at the DOS-Prompt and invoke the script with its parameters (the “.\” before the script name is important!):

CD C:\Scripts
powershell .\DNN-xyz.ps1 -parameter1 value1 -parameter2 value2 …

Please be aware of the following points

  • All paths must end with “\”.
  • All scripts need an installed version of 7-zip (see http://www.7-zip.org/)
  • Parameters not set use their default values.
  • Be careful ! Try the scripts first in a safe environment before using in production. There are a lot of different machines and software releases outside in the wild and I tested only on my environments. In no case I am responsible for any damages the scripts will produce!
  • Enhancements, tips and pull requests are welcome !

 

DNN-Install

Installs a DNN website. Copies all needed files to the folder of your choice, registers the website in IIS, creates the database and adds a line in hosts file for invocation of the website locally. Starts browser afterwards and fills in the values in the installation form.

Parameters:

InstallPath Target Installation Folder (must have “\” at the end)
WinAccount Name of windows account to set folder security (e.g. “Network Service”)
WebsiteName Name of the website in IIS (e.g. “mywebsite”)
WebsiteUrl Url of website (eg. “www.mywebsite.com”)
DBName Name of created database (e.g. “mywebsiteDB”)
DBInstance Name of SQL Instance (e.g. “.\SQLEXPRESS”)
DBUser Name of db user with access to database (e.g. “testuser”)
DBPassword Password of db user (e.g. “testpassword”)
DBQualifier Prefix for DNN tables (leave empty if no prefix) (e.g. “dnn”)
HostUser Name of DNN superuser (e.g. “host”)
HostPassword Password of superuser (e.g. “dnnhost”)
HostEmail Email address of superuser (e.g. “host@change.me”)
InstallPackage Path to DNN Install zip (e.g."D:\Install\DotNetNuke\DNN_Platform_07.03.04_Install.zip")

Sample:

powershell .\DNN-Install.ps1 -Installpath C:\Inetpub\wwwroot\bitboxx\dnn 
-WinAccount “Network Service” -WebsiteName bitboxx -WebsiteUrl www.bitboxx.net -DBName bitboxx -DBInstance 
.\SQLEXPRESS $DBUser bitboxx $DBPassword donottell $Hostuser host $HostPassword 
dnnhost -HostEmail host@bitboxx.net
-InstallPackage D:\Install\DotNetNuke\DNN_Platform_07.03.04_Install.zip

 

DNN-Upgrade

Upgrades an existing DNN installation. Creates “app-offline” file, unzips the DNN upgrade package to the desination folder, deletes “app-offline” file and invokes the update installation by calling “http://www.mywebsite.com/install/install.aspx?mode=upgrade”

Parameters:

InstallPath Target Installation Folder (must have “\” at the end)
WebsiteUrl Url of website (eg. “www.mywebsite.com”)
UpgradePackage Path to DNN Upgradezip (e.g."D:\Install\DotNetNuke\DNN_Platform_07.03.04_Upgrade.zip")

Sample:

powershell .\DNN-Upgrade.ps1 -Installpath C:\Inetpub\wwwroot\bitboxx\dnn
-WebsiteUrl www.bitboxx.net -UpgradePackage 
D:\Install\DotNetNuke\DNN_Platform_07.03.04_Upgrade.zip

DNN-Backup

Creates a Backup of a DNN installation depending on parameters backs up database / website / logs. Creates different zip files for every type of backup in OutputPath (e.g. “mywebsite_dnn.zip”,”mywebsite_db.zip” and / or “mywebsite_log.zip”)

Parameters:

DBName Name of database (and name of backup)
InstallPath Path of DNN installation to backup
LogPath Path of log files to backup
OutputPath Path where backup files are created
DBInstance Name of SQL Instance (e.g. “.\SQLEXPRESS”)
ExcludeWildcard pattern of filestype to exclude (e.g “*.mp4”)
IncludeLogs if present log backup is created
IncludeDNN if present DNN backup is created
IncludeDB if present DB backup is created

Sample:

powershell .\DNN-Bckup.ps1 -DBName bitboxx -Installpath 
C:\Inetpub\wwwroot\bitboxx\dnn -LogPath C:\Inetpub\wwwroot\bitboxx\logs 
-OutputPath C:\Backup\ -DBInstance 
.\SQLEXPRESS –IncludeLogs –IncludeDNN –IncludeDB

DNN-Restore

Restores a DNN website from a backup previously created with DNN backup. Restores DNN files and database.

Parameters:

InstallPath Target Installation Folder (must have “\” at the end)
WinAccount Name of windows account to set folder security (e.g. “Network Service”)
WebsiteName Name of the website in IIS (e.g. “mywebsite”)
WebsiteUrl Url of website (eg. “www.mywebsite.com”)
DBName Name of created database (e.g. “mywebsiteDB”)
DBInstance Name of SQL Instance (e.g. “.\SQLEXPRESS”)
DBUser Name of db user with access to database (e.g. “testuser”)
DBPassword Password of db user (e.g. “testpassword”)
InputPath Path to Backup files(e.g. "D:\Backup")

Sample:

powershell .\DNN-Restore.ps1 -Installpath C:\Inetpub\wwwroot\bitboxx\dnn 
-WinAccount “Network Service” -WebsiteName bitboxx -WebsiteUrl www.bitboxx.net -DBName bitboxx -DBInstance 
.\SQLEXPRESS $DBUser bitboxx $DBPassword donottell –InputPath C:\Backup\

Last edited Oct 17, 2016 at 10:17 AM by bitboxx, version 5