I have tried following script to set default value of Yes/No Field to Yes which is by default set to No in list Yes/No column, i get false result at last line.
I have tried these values: 1 , $true, "1", Yes and "Yes" at line 1, but nothing works
$item.Fields["My YesNo Field"].DefaultValue = "Yes" //Line 1
$item.Fields["My YesNo Field"].Update()
Write-host $item["My YesNo Field"].ToString()
Any idea to fix?

0 commentaires:
Enregistrer un commentaire