Skip to content

Instantly share code, notes, and snippets.

@michaelgwelch
Last active July 16, 2021 17:46
Show Gist options
  • Save michaelgwelch/f5ec19387ab1562cd1db2879bb0c746b to your computer and use it in GitHub Desktop.
Save michaelgwelch/f5ec19387ab1562cd1db2879bb0c746b to your computer and use it in GitHub Desktop.
powershell syntax highlighting?

This is a test to see if powershell has syntax highlighting

$update = @{
item = @{
description = "hello"
}
}
$update = @{
item = @{
description = "hello"
}
}
$update = @{
item = @{
description = "hello"
}
}
# Create the update object, with an item property with is also a hashtable
PS > $update = @{ item = @{ } }

# Set the name property value
PS > $update.item.name = "ZN3-Setpt"

# Set the description property value
PS > $update.item.description = "Temperature Set Point"

# Use a nested hashtable to define conectedTo
# Notice the prompt is >> as PowerShell is waiting for more input
PS > $update.item.connectedTo = @{
>> objectReference = "welchoas:welchoas/AV2";
>> attribute = "attributeEnumSet.presentValue"
>> }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment