To execute a single command start a command prompt, change directory to the location of the MacroView.Solutions.Provisioning.Console.exe, then either type out a command or copy / paste a command from the ConsoleCommand.xlsx spreadsheet (see How to write Commands page).
Step 1
Run > Command Prompt
or
Run a command prompt using the Windows Start button and search for Command Prompt (CMD)
Step 2
cd "C:\Program Files\MacroView\MVSP\Standalone"
Step 3
C:\ProgramFiles\MacroView\MVSP\Standalone> MacroView.Solutions.Provisioning.Console.exe -Operation CreateSiteCollection -Url "https://abc.sharepoint.com/sites/XYZ" -Title "XYZ" -LanguageId 1033 -TimezoneId 76 -Storage 1 -SiteTemplate STS#3 -PackageKey MV -OptionKey MV_Create_SiteCollection
C:\ProgramFiles\MacroView\MVSP\Standalone> MacroView.Solutions.Provisioning.Console.exe -Operation CreateSiteCollection -Url "https://abc.sharepoint.com/sites/XYZ" -Title "XYZ" -LanguageId 1033 -TimezoneId 76 -Storage 1 -SiteTemplate STS#3 -PackageKey MV -OptionKey MV_Create_SiteCollection
Note
Creating site collections is supported in SharePoint Online (Office 365). Creating site collections is not supported for SharePoint On-Premise environments (SP2013, SP2016, SP2019). To create site collections in on-premise environments please use the SharePoint Central Administration web site.
Important
If copy and pasting commands from the Console.Command.xlsx spreadsheet do not forget to add the MacroView.Solutions.Provisioning.Console.exe prefix to the command being pasted in.
The reason the prefix is not part of the spreadsheet is that while the spreadsheet can be used to author and run a single command. The primary purpose of the spreadsheet is to author batch files (see Creating Batch Files page) in order to carry out bulk provisioning. In batch files the prefix is not required.
Step 4
When a command is executed, the user is prompted to Authenticate.
Authentication and Enabling Sessions
The user will be required to authenticate before executing each command to ensure that they can only be executed by a user with appropriate SharePoint permissions.
If running against SharePoint Online (Office 365), MacroView Provisioner will use Modern Authentication (OAUTH2).
If running against SharePoint Online (Office 365) the user can include the SessionEnabled 1 argument to each command to persist the access token to an encrypted token cache file so that authentication is not required if the next command is executed before the token expires. If the SessionEnabled 1 argument is not provided any existing token cache file is deleted and the user is prompted to authenticate.
Add the following SessionEnabled argument to any command in order to cache Office 365 tokens.
-SessionEnabled 1
Important
If using session enabled, in order to swap accounts (i.e. clear the token cache) just omit the SessionEnabled argument or set its value to zero and you will be prompted to authenticate.
Result
The Site Collection is created and a "success" message is output.
Note
Creating a site collection in Office 365 normally takes between 3 to 4 minutes, however Office 365 may take longer to provision the site collection.
Continue to Part 8 - Batch File Command