OSDCloud Workspace

New-OSDCloud.workspace has been renamed to New-OSDCloudWorkspace (without the period in the name). The old name is now an Alias, but that will be removed on April 1, 2022
This function requires elevated Admin Rights
Before getting too deep on how to create an OSDCloud Workspace, let me first explain what an OSDCloud Workspace is. In a nutshell, an OSDCloud Workspace is a copy of the OSDCloud Template that you can customize with Configuration Files, Wallpaper, Drivers, and Startup Configuration. Since it is a copy of your OSDCloud Template, this allows you to create multiple OSDCloud Workspaces that are customized with different configurations. The best example I can give as to why you might need separate OSDCloud Workspaces is to keep one for Development and the second for Production


It's a good idea to remember how to know what your current OSDCloud Workspace is. You can find out with the Get-OSDCloudWorkspace function
On a system that has never created an OSDCloud Workspace, you will receive the following Warning and nothing will be returned
PS C:\> Get-OSDCloudWorkspace
WARNING: 2022-02-22-223047 Unable to locate C:\ProgramData\OSDCloud\workspace.json
Here is an example of how to test if you have an OSDCloud Workspace
PS C:\> if (Get-OSDCloudWorkspace) {$true} else {$false}
WARNING: 2022-02-22-223256 Unable to locate C:\ProgramData\OSDCloud\workspace.json
Ideally, you should get a path returned if you have an OSDCloud Workspace
PS C:\> Get-OSDCloudWorkspace
The current OSDCloud Workspace is stored in the OSDCloud Template at C:\ProgramData\OSDCloud\workspace.json

[Admin] Set-OSDCloudWorkspace

The OSDCloud Workspace can also be set. This is typically handled automatically when you create a new OSDCloud Workspace, but you can also set this with the Set-OSDCloudWorkspace function. Here are some examples
[ADMIN]: PS C:\> Get-OSDCloudWorkspace
[ADMIN]: PS C:\> Set-OSDCloudWorkspace C:\OSDCloudDev
[ADMIN]: PS C:\> Get-OSDCloudWorkspace
[ADMIN]: PS C:\> Set-OSDCloudWorkspace -WorkspacePath C:\OSDCloudProd
[ADMIN]: PS C:\> Get-OSDCloudWorkspace

[Admin] New-OSDCloudWorkspace

[Default] fromTemplate

Now that you understand how to Get and Set an OSDCloud Workspace, here are some examples on how to create a new OSDCloud Workspace
[ADMIN]: PS C:\> New-OSDCloudWorkspace
2022-02-23-004127 New-Item C:\OSDCloud
2022-02-23-004128 New-OSDCloudWorkspace created at C:\OSDCloud
[ADMIN]: PS C:\> New-OSDCloudWorkspace C:\OSDCloudDev
2022-02-23-004148 New-Item C:\OSDCloudDev
2022-02-23-004149 New-OSDCloudWorkspace created at C:\OSDCloudDev
[ADMIN]: PS C:\> New-OSDCloudWorkspace -WorkspacePath C:\OSDCloudProd
2022-02-23-004214 New-Item C:\OSDCloudProd
2022-02-23-004215 New-OSDCloudWorkspace created at C:\OSDCloudProd
[ADMIN]: PS C:\> Get-OSDCloudWorkspace


If you have an existing OSDCloud ISO, you can use this to create a new OSDCloud Workspace and the -fromIsoFile parameter. Here is an example of how this works


You may be able to specify the URL of an ISO file for the -fromIsoUrl parameter. This will download the ISO, mount the ISO, create the OSDCloud Workspace, then dismount the ISO


If you have an OSDCloud USB, you can use the -fromUsbDrive switch parameter to create the OSDCloud Workspace from the USB content

OSDCloud Workspace Contents

This is what an OSDCloud Workspace looks like when created from an OSDCloud Template
Recast Software
OSDeploy is sponsored by Recast Software