Created
October 18, 2021 14:35
-
-
Save slydlake/750877352655b5b0ece960fa5b5970de to your computer and use it in GitHub Desktop.
[VDS Eigenschaft auf NULL prüfen] #powershell #VDS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Erzwinge roten Rahmen, wenn Eigenschaften leer sind | |
#Gilt nur wenn Eigenschaften NICHT im Dynamic Grid sind | |
$CheckProperties = @("Description") | |
CheckPropertyNull $CheckProperties | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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