This project is read-only.
1
Vote

Problem with Booleans

description

Had problem where the sub properties requiring a boolean value were reading everything as true because powershell recognizes all string values as true (see post here http://poshoholic.com/2007/09/13/essential-powershell-beware-of-promiscuous-types/) -- corrected by changing the XML file for below values from "1" to "True" or "0" to "False" and declaring the variables in the script with a conversion:
 
$SharePointPropIsVisibleOnEditor = [System.Convert]::ToBoolean($ProfilePropertyCreation.IsVisibleOnEditor)
$SharePointPropIsVisibleOnViewer = [System.Convert]::ToBoolean($ProfilePropertyCreation.IsVisibleOnViewer)
$SharePointPropIsEventLog = [System.Convert]::ToBoolean($ProfilePropertyCreation.IsEventLog)

comments