Write-SystemSpecsToJson
SYNOPSIS
Write system specifications to a JSON file.
SYNTAX
DESCRIPTION
This function takes system specifications in JSON format, extracts the computer name, and writes the specifications to a JSON file in a predefined directory. If the directory does not exist, the function does nothing.
EXAMPLES
EXAMPLE 1
Write-SystemSpecsToJson -SystemSpecs '{"ComputerName": "Device01", "CPU": "Intel i7", "RAM": "16GB"}'
Writes the system specifications for "Device01" to a JSON file in the predefined directory.
EXAMPLE 2
PS C:\> Write-SystemSpecsToJson -SystemSpecs $specs Retrieves system specifications, converts them to JSON, and writes them to a file.
PARAMETERS
-SystemSpecs
A JSON string containing the system specifications, including the computer name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False