SCCM – VBScript – Disable C Drive

email me

Compile to EXE, add the EXE you just created to SCCM as a package: Create Package > Environment > Program can run: Only when user is logged on > Run with administrator rights (or SYSTEM account).

on error resume next

Set objShell = CreateObject("Wscript.Shell")

Const HKEY_LOCAL_MACHINE = &H80000002

Const OverwriteExisting = TRUE

strCurrentDirectory = objShell.CurrentDirectory

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set objRegistry=GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\ProfileList"

objRegistry.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubkeys

For Each objSubkey In arrSubkeys

on error resume next

strValueName = "ProfileImagePath"

strSubPath = strKeyPath & "\" & objSubkey

objRegistry.GetExpandedStringValue HKEY_LOCAL_MACHINE,strSubPath,strValueName,strValue

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set objAccount = objWMIService.Get("Win32_SID.SID='" & objSubkey & "'")

strUser = objAccount.AccountName

objSubkey = trim(objSubkey)'trims whitespace
strUser = trim(strUser)'trims whitespace

'LOGIC TO DETERMINE IF PROFILE IS TO BE ACCESSED
if strUser = "System" then strUser=""
if strUser = "Administrator" then strUser=""
if strUser = "Media" then strUser=""
if strUser = "Default" then strUser=""
if strUser = "IntuneAdmin" then strUser=""

if strUser <> "" then

on error resume next

'COPY FILES
'objShell.Run "cmd /c copy /y /v file1.txt C:\Users\" & strUser &
"\Desktop\file1.txt",0,true

'APPLY REG KEY
objShell.Run "REG ADD " & chr(34) & "HKEY_Users\" & objSubkey & "\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"" /v NoViewOnDrive /t REG_DWORD /d 00000004 /f",0,false

end if

Next

Google Chrome – 74.0.3729.108

email me

Download

New Chrome browser is available here:

https://enterprise.google.com/intl/en_version/chrome/chrome-browser/ mirror


Size

55.3 MB


MSI Property Table

UpgradeCode                                 {C1DFDF69-5945-32F2-A35E-EE94C99C7CF4}
AllowDowngradeSubstitution      false
ALLUSERS                                        1
ARPPRODUCTICON                        icon.ico
ARPNOMODIFY                              1
Manufacturer                                 Google LLC
ProductCode                                  {B93553B7-F366-388E-ADB8-EDEAC41EADC2}
ProductLanguage                          1033
ProductName                                 Google Chrome
ProductVersion                              67.164.16492
SecureCustomProperties             NEWPRODUCTFOUND;UPGRADEFOUND


Silent Install

setup.msi /quiet /norestart


Notes

Release Notes

 

Windows 10 – Set Accent Color

email me

If creating a policy package for SCCM: Compile to EXE, add the EXE you just created to SCCM as a package: Create Package > Environment > Program can run: Only when user is logged on > Run with user rights.

 

Commands

reg add “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent” /v AccentColorMenu /t REG_DWORD /d 4292311040 /f

reg add “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent” /v AccentPalette /t REG_BINARY /d a6d8ff0076b9ed00429ce3000078d700005a9e000042750000264200f7630c00 /f

reg add “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent” /v StartColorMenu /t REG_DWORD /d 4288567808 /f


Save as Accent.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent]
“AccentPalette”=hex:a6,d8,ff,00,76,b9,ed,00,42,9c,e3,00,00,78,d7,00,00,5a,9e,00,00,42,75,00,00,26,42,00,f7,63,0c,00
“StartColorMenu”=dword:ff9e5a00
“AccentColorMenu”=dword:ffd77800

 

Notes

VBScript

Set objShell = CreateObject("WScript.Shell")

on error resume next

objShell.Run "REG ADD " & chr(34) & "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" & chr(34) & " /v AccentColorMenu /t REG_DWORD /d 4292311040 /f",0,false
objShell.Run "REG ADD " & chr(34) & "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" & chr(34) & " /v AccentPalette /t REG_BINARY /d a6d8ff0076b9ed00429ce3000078d700005a9e000042750000264200f7630c00 /f",0,false
objShell.Run "REG ADD " & chr(34) & "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" & chr(34) & " /v  StartColorMenu /t REG_DWORD /d 4288567808 /f",0,false

 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SystemProtectedUserData\%UserSID%\AnyoneRead\Colors

type: dword
value: AccentColor
data: 4287365347

 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SystemProtectedUserData\%UserSID%\AnyoneRead\Colors

type: dword
value: StartColor
data: 4279042201

 

reg add “HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM” /v AccentColor /t REG_DWORD /d “4292311040” /f

reg add “HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM” /v ColorizationAfterglow /t REG_DWORD /d “3288365271” /f

reg add “HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM” /v ColorizationColor /t REG_DWORD /d “3288365271” /f

 
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization

Windows – Setting Wallpaper Policy

email me

If creating a policy package for SCCM: Compile to EXE, add the EXE you just created to SCCM as a package: Create Package > Environment > Program can run: Only when user is logged on > Run with user rights.


Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop
type: dword
value: NoChangingWallPaper
data: 1

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
type: string
value: Wallpaper
data: C:\Windows\WelcomeScan.jpg

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
type: string
value: WallpaperStyle
data: 0

 

Notes

CSP

reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP” /v “DesktopImageStatus” /t reg_dword /d 1 /f /reg:64

reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP” /v “DesktopImagePath” /t reg_sz /d “C:\Windows\Desktop.png” /f /reg:64

reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP” /v “DesktopImageUrl” /t reg_sz /d “C:\Windows\Desktop.png” /f /reg:64

Windows – C# – Enable Desktop Icons

email me

If creating a policy package for SCCM: Compile to EXE, add the EXE you just created to SCCM as a package: Create Package > Environment > Program can run: Only when user is logged on > Run with user rights.

 

using System;
using System.Runtime.InteropServices;

namespace ConsoleApp22
{
class Program
{
static void Main(string[] args)

{

bool retValue = IsVisible();
Console.Write(retValue);

if (!retValue) {
ToggleDesktopIcons();
};

Console.ReadKey();

}

[DllImport("user32.dll", SetLastError = true)] static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true)] static extern IntPtr GetWindow(IntPtr hWnd, GetWindow_Cmd uCmd);
enum GetWindow_Cmd : uint
{
GW_HWNDFIRST = 0,
GW_HWNDLAST = 1,
GW_HWNDNEXT = 2,
GW_HWNDPREV = 3,
GW_OWNER = 4,
GW_CHILD = 5,
GW_ENABLEDPOPUP = 6
}
[DllImport("user32.dll", CharSet = CharSet.Auto)] static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);

private const int WM_COMMAND = 0x111;

static void ToggleDesktopIcons()
{
var toggleDesktopCommand = new IntPtr(0x7402);
IntPtr hWnd = GetWindow(FindWindow("Progman", "Program Manager"), GetWindow_Cmd.GW_CHILD);
SendMessage(hWnd, WM_COMMAND, toggleDesktopCommand, IntPtr.Zero);
}

// return if visible or not

[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("user32.dll", SetLastError = true)]
private static extern bool GetWindowInfo(IntPtr hwnd, ref WINDOWINFO pwi);

[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
private int _Left;
private int _Top;
private int _Right;
private int _Bottom;
}

[StructLayout(LayoutKind.Sequential)]
struct WINDOWINFO
{
public uint cbSize;
public RECT rcWindow;
public RECT rcClient;
public uint dwStyle;
public uint dwExStyle;
public uint dwWindowStatus;
public uint cxWindowBorders;
public uint cyWindowBorders;
public ushort atomWindowType;
public ushort wCreatorVersion;

public WINDOWINFO(Boolean? filler)
: this()   // Allows automatic initialization of "cbSize" with "new WINDOWINFO(null/true/false)".
{
cbSize = (UInt32)(Marshal.SizeOf(typeof(WINDOWINFO)));
}

}

static bool IsVisible()
{
IntPtr hWnd = GetWindow(GetWindow(FindWindow("Progman", "Program Manager"), GetWindow_Cmd.GW_CHILD), GetWindow_Cmd.GW_CHILD);
WINDOWINFO info = new WINDOWINFO();
info.cbSize = (uint)Marshal.SizeOf(info);
GetWindowInfo(hWnd, ref info);
return (info.dwStyle & 0x10000000) == 0x10000000;
}

}
}

Windows – C# – Disable Desktop Icons

email me

If creating a policy package for SCCM: Compile to EXE, add the EXE you just created to SCCM as a package: Create Package > Environment > Program can run: Only when user is logged on > Run with user rights.

 

using System;
using System.Runtime.InteropServices;

namespace ConsoleApp22
{
class Program
{
static void Main(string[] args)

{

bool retValue = IsVisible();
Console.Write(retValue);

if (retValue) {
ToggleDesktopIcons();
};

Console.ReadKey();

}

[DllImport("user32.dll", SetLastError = true)] static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true)] static extern IntPtr GetWindow(IntPtr hWnd, GetWindow_Cmd uCmd);
enum GetWindow_Cmd : uint
{
GW_HWNDFIRST = 0,
GW_HWNDLAST = 1,
GW_HWNDNEXT = 2,
GW_HWNDPREV = 3,
GW_OWNER = 4,
GW_CHILD = 5,
GW_ENABLEDPOPUP = 6
}
[DllImport("user32.dll", CharSet = CharSet.Auto)] static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);

private const int WM_COMMAND = 0x111;

static void ToggleDesktopIcons()
{
var toggleDesktopCommand = new IntPtr(0x7402);
IntPtr hWnd = GetWindow(FindWindow("Progman", "Program Manager"), GetWindow_Cmd.GW_CHILD);
SendMessage(hWnd, WM_COMMAND, toggleDesktopCommand, IntPtr.Zero);
}

// return if visible or not

[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("user32.dll", SetLastError = true)]
private static extern bool GetWindowInfo(IntPtr hwnd, ref WINDOWINFO pwi);

[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
private int _Left;
private int _Top;
private int _Right;
private int _Bottom;
}

[StructLayout(LayoutKind.Sequential)]
struct WINDOWINFO
{
public uint cbSize;
public RECT rcWindow;
public RECT rcClient;
public uint dwStyle;
public uint dwExStyle;
public uint dwWindowStatus;
public uint cxWindowBorders;
public uint cyWindowBorders;
public ushort atomWindowType;
public ushort wCreatorVersion;

public WINDOWINFO(Boolean? filler)
: this()   // Allows automatic initialization of "cbSize" with "new WINDOWINFO(null/true/false)".
{
cbSize = (UInt32)(Marshal.SizeOf(typeof(WINDOWINFO)));
}

}

static bool IsVisible()
{
IntPtr hWnd = GetWindow(GetWindow(FindWindow("Progman", "Program Manager"), GetWindow_Cmd.GW_CHILD), GetWindow_Cmd.GW_CHILD);
WINDOWINFO info = new WINDOWINFO();
info.cbSize = (uint)Marshal.SizeOf(info);
GetWindowInfo(hWnd, ref info);
return (info.dwStyle & 0x10000000) == 0x10000000;
}

}
}

Windows 10 – C++ Change Background Color

email me

How to change the Background Color in Windows 10.

CPP Console App, compiled using VS2017, Community Edition.

 

If creating a policy package for SCCM: Compile to EXE, add the EXE you just created to SCCM as a package: Create Package > Environment > Program can run: Only when user is logged on > Run with user rights.


Code, Console App (shows console)

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "user32.lib")</stdio.h></windows.h>

void main()
{
int aElements[1] = { COLOR_BACKGROUND };
DWORD aNewColors[1];
aNewColors[0] = RGB(0x40, 0x40, 0x40);  // gray
SetSysColors(1, aElements, aNewColors);
}

 

Code, Desktop App (no console)

#include "stdafx.h"
#include "WindowsProject9.h"

// Global Variables:
HINSTANCE hInst;

// Forward declarations of functions included in this code module:
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR    lpCmdLine,
_In_ int       nCmdShow)
{

int aElements[1] = { COLOR_BACKGROUND };
DWORD aNewColors[1];
aNewColors[0] = RGB(0x00, 0x00, 0x00);  // black
SetSysColors(1, aElements, aNewColors);

}

 


Notes

SetSysColors function

Other functions

 

Commands

REG ADD “HKCU\Control Panel\Colors” /v Background /t REG_SZ /d “0 0 0” /f
REG ADD “HKCU\Control Panel\Desktop\Colors” /v Background /t REG_SZ /d “0 0 0” /f


VBScript

Set objShell = CreateObject(“WScript.Shell”)

objShell.Run “REG ADD “”HKCU\Control Panel\Colors”” /v Background /t REG_SZ /d “”0 0 0″” /f”,0,false

objShell.Run “REG ADD “”HKCU\Control Panel\Desktop\Colors”” /v Background /t REG_SZ /d “”0 0 0″” /f”,0,false

PowerShell DSC – Service Example

email me

Show more about DSC...

 

Using a DSC script, set service to Automatic and Running, start configuration, and view configuration.

The basic processing works like this:

make a declarative script > generate mof > apply mof > verify configuration is running


Code

Set-Location "C:\DSC\"

Configuration ServiceExample
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Node localhost
{

Service ServiceExample
{
Name        = "wuauserv"
StartupType = "Automatic" # Automatic, Disabled, and Manual
State       = "Running"
}
}
}

# create mof
ServiceExample

# load configuration from mof
Start-DscConfiguration -Path ServiceExample -ComputerName localhost -Wait -Verbose -Force

# check configuration
Get-DscConfiguration

 


Notes

Install-Module -Name PSDesiredStateConfiguration
winrm quickconfig

Desired State Configuration Overview for Engineers

PSDesiredStateConfiguration

Get-DscConfiguration

DSC mofs C:\Windows\System32\Configuration

 

Contents of the mof file

/*
@TargetNode='localhost'
@GeneratedBy=Homelab
@GenerationDate=04/16/2019 12:49:32
@GenerationHost=HOMELAB
*/

instance of MSFT_ServiceResource as $MSFT_ServiceResource1ref
{
ResourceID = "[Service]ServiceExample";
State = "Running";
SourceInfo = "C:\\DSC\\ServiceExample.ps1::9::9::Service";
Name = "wuauserv";
StartupType = "Automatic";
ModuleName = "PSDesiredStateConfiguration";

ModuleVersion = "1.0";

ConfigurationName = "ServiceExample";

};
instance of OMI_ConfigurationDocument

{
Version="2.0.0";

MinimumCompatibleVersion = "1.0.0";

CompatibleVersionAdditionalProperties= {"Omi_BaseResource:ConfigurationName"};

Author="Homelab";

GenerationDate="04/16/2019 12:49:32";

GenerationHost="HOMELAB";

Name="ServiceExample";

};

PowerShell DSC – Enable Web-Server, Windows Feature

email me

Show more about DSC...

 

Using a DSC script, install the Web Server Windows feature, start configuration, and view configuration.

* available only on the Server platform

 

The basic processing works like this:

make a declarative script > generate mof > apply mof > verify configuration is running


Code

Set-Location "C:\DSC\"

configuration FeatureExample
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Node localhost
{

WindowsFeatureSet FeaturExample
{
Name                    = @("Web-Server")
Ensure                  = 'Present'
IncludeAllSubFeature    = $true
}
}
}

FeatureExample

Start-DscConfiguration -Path FeatureExample -ComputerName localhost -Wait -Verbose -Force

 


Notes

Install-Module -Name PSDesiredStateConfiguration
winrm quickconfig

Desired State Configuration Overview for Engineers

PSDesiredStateConfiguration

Get-DscConfiguration

DSC mofs C:\Windows\System32\Configuration

PowerShell DSC – Copy Folder, Recursively

email me

Show more about DSC...

 

Using a DSC script, copy contents of a source to a destination folder, start configuration, and view configuration.

The basic processing works like this:

make a declarative script > generate mof > apply mof > verify configuration is running


Code

# create configuration

Set-Location "C:\DSC\"

Configuration CopyFolderExample
{
Node "localhost"
{
File DirectoryCopy
{
Ensure = "Present" # Present, Absent.
Type = "Directory" # File, Directory
Recurse = $true # $true, $false
SourcePath = "c:\DSC\source"
DestinationPath = "C:\DSC\destination"
}

}
}

# create mof
CopyFolderExample

# load configuration from mof
Start-DscConfiguration -Path CopyFolderExample -ComputerName localhost -Wait -Verbose -Force

# check configuration
Get-DscConfiguration

 


Notes

Install-Module -Name PSDesiredStateConfiguration
winrm quickconfig

Desired State Configuration Overview for Engineers

PSDesiredStateConfiguration

Get-DscConfiguration

DSC mofs C:\Windows\System32\Configuration

 

Contents of the mof file

/*
@TargetNode='localhost'
@GeneratedBy=Homelab
@GenerationDate=04/16/2019 07:40:11
@GenerationHost=HOMELAB
*/

instance of MSFT_FileDirectoryConfiguration as $MSFT_FileDirectoryConfiguration1ref
{
ResourceID = "[File]DirectoryCopy";
Type = "Directory";
Ensure = "Present";
DestinationPath = "C:\\DSC\\destination";
ModuleName = "PSDesiredStateConfiguration";
SourceInfo = "C:\\DSC\\FolderExample.ps1::9::9::File";
Recurse = True;
SourcePath = "c:\\DSC\\source";

ModuleVersion = "1.0";

ConfigurationName = "CopyFolderExample";

};
instance of OMI_ConfigurationDocument

{
Version="2.0.0";

MinimumCompatibleVersion = "1.0.0";

CompatibleVersionAdditionalProperties= {"Omi_BaseResource:ConfigurationName"};

Author="Homelab";

GenerationDate="04/16/2019 07:40:11";

GenerationHost="HOMELAB";

Name="CopyFolderExample";

};

PowerShell DSC – File Example

Show more about DSC...

 

Using a DSC script, create a file in destination folder, start configuration, and view configuration.

The basic processing works like this:

make a declarative script > generate mof > apply mof > verify configuration is running


Code

Set-Location "C:\temp\"

# define configuration

configuration FileExample
{
Import-DscResource -ModuleName PSDesiredStateConfiguration

Node localhost
{

File FileExample
{
Ensure           = 'Present' # Present, Absent
Contents         = 'Config settings in file'
DestinationPath  = 'C:\temp\FileExample.txt'
Type             = 'File'

}
}
}

# create mof
FileExample

# load configuration from mof
Start-DscConfiguration -Path FileExample -ComputerName localhost -Wait -Verbose -Force

# check configuration
Get-DscConfiguration

 

Notes

Install-Module -Name PSDesiredStateConfiguration

winrm quickconfig

see PowerShell DSC – Registry Example

DSC mofs C:\Windows\System32\Configuration

 

Contents of the mof file

/*
@TargetNode='localhost'
@GeneratedBy=Homelab
@GenerationDate=04/15/2019 21:46:55
@GenerationHost=HOMELAB
*/

instance of MSFT_RegistryResource as $MSFT_RegistryResource1ref
{
ResourceID = "[Registry]RegistryExample";
ValueName = "ValueHere";
Key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\ExampleKey";
Ensure = "Present";
SourceInfo = "C:\\temp\\reg_example.ps1::8::2::Registry";
ValueType = "String";
ModuleName = "PSDesiredStateConfiguration";
ValueData = {
"DataHere"
};

ModuleVersion = "1.0";

ConfigurationName = "RegistryExample";

};
instance of OMI_ConfigurationDocument

{
Version="2.0.0";

MinimumCompatibleVersion = "1.0.0";

CompatibleVersionAdditionalProperties= {"Omi_BaseResource:ConfigurationName"};

Author="Homelab";

GenerationDate="04/15/2019 21:46:55";

GenerationHost="HOMELAB";

Name="RegistryExample";

};

PowerShell DSC – Registry Example

email me

Show more about DSC...

 

Using a DSC script, create a registry key, start configuration, and view configuration.

The basic processing works like this:

make a declarative script > generate mof > apply mof > verify configuration is running


Code

Set-Location "C:\DSC\"

Configuration RegistryExample
{
Node localhost
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Registry RegistryExample
{
Ensure      = "Present"  # Present, Absent
Key         = "HKEY_LOCAL_MACHINE\SOFTWARE\ExampleKey"

ValueName   = "ValueHere"
ValueData   = "DataHere"
}
}
}

# create mof
RegistryExample

# load configuration from mof
Start-DscConfiguration -Path RegistryExample -ComputerName localhost -Wait -Verbose -Force

# check configuration
Get-DscConfiguration

 

+ ValueType = “String”
+ Force         = $true


Notes

Install-Module -Name PSDesiredStateConfiguration
winrm quickconfig

Desired State Configuration Overview for Engineers

PSDesiredStateConfiguration

Get-DscConfiguration

DSC mofs C:\Windows\System32\Configuration

 

Contents of the mof file

/*
@TargetNode='localhost'
@GeneratedBy=Homelab
@GenerationDate=04/15/2019 19:13:08
@GenerationHost=HOMELAB
*/

instance of MSFT_RegistryResource as $MSFT_RegistryResource1ref
{
ResourceID = "[Registry]RegistryExample";
ValueName = "ValueHere";
Key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\ExampleKey";
Ensure = "Present";
SourceInfo = "C:\\DSC\\reg_example.ps1::8::2::Registry";
ModuleName = "PSDesiredStateConfiguration";
ValueData = {
"DataHere"
};

ModuleVersion = "1.0";

ConfigurationName = "RegistryExample";

};
instance of OMI_ConfigurationDocument

{
Version="2.0.0";

MinimumCompatibleVersion = "1.0.0";

CompatibleVersionAdditionalProperties= {"Omi_BaseResource:ConfigurationName"};

Author="Homelab";

GenerationDate="04/15/2019 19:13:08";

GenerationHost="HOMELAB";

Name="RegistryExample";

};