Skip to content

Instantly share code, notes, and snippets.

@slydlake
Created October 18, 2021 14:35
Show Gist options
  • Save slydlake/750877352655b5b0ece960fa5b5970de to your computer and use it in GitHub Desktop.
Save slydlake/750877352655b5b0ece960fa5b5970de to your computer and use it in GitHub Desktop.
[VDS Eigenschaft auf NULL prüfen] #powershell #VDS
#Erzwinge roten Rahmen, wenn Eigenschaften leer sind
#Gilt nur wenn Eigenschaften NICHT im Dynamic Grid sind
$CheckProperties = @("Description")
CheckPropertyNull $CheckProperties
function CheckPropertyNull ($propertyNames) {
foreach ($property in $propertyNames) {
$startValue = $Prop[$property].Value
if ([string]::IsNullOrEmpty($startValue)) {
$Prop[$property].Value = "_"
$Prop[$property].Value = $null
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment