Skip To Content
PowerShell Gallery
Toggle navigation
Packages
Publish
Documentation
Sign in
Search PowerShell packages:
PSNtfy
0.2.1
private/Add-ObjectPropSafe.ps1
function
Add-ObjectPropSafe
{
param
(
$Object
,
$Key
,
$Value
)
if
(
$Value
-and
-not
[string]
::
IsNullOrWhiteSpace
(
$Value
)
)
{
$Object
.
Add
(
$Key
,
$Value
)
}
}