Last active
August 29, 2015 14:22
-
-
Save sebastienlevert/c895f007330fb17a24c2 to your computer and use it in GitHub Desktop.
Execute-Set-FieldVisibility01.ps1
This file contains 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
#----------------------------------------------------------------------- | |
# Loads the Set-Visibility Cmdlets | |
#----------------------------------------------------------------------- | |
. .\Set-FieldVisibility.ps1 | |
#----------------------------------------------------------------------- | |
# Connects to your Office 365 SharePoint Online tenant | |
#----------------------------------------------------------------------- | |
Connect-SPOnline -Url https://<tenant>.sharepoint.com -Credentials <credentialslabel> | |
#----------------------------------------------------------------------- | |
# Gets the desired List based on its Url | |
#----------------------------------------------------------------------- | |
$list = Get-SPOList -Identity "Lists/<Name>" | |
#----------------------------------------------------------------------- | |
# Gets the desired Field based on its internal name and its containing List | |
#----------------------------------------------------------------------- | |
$field = Get-SPOField -List $list -Identity "InternalName" | |
#----------------------------------------------------------------------- | |
# Set the Field Visibility configuration | |
#----------------------------------------------------------------------- | |
Set-FieldVisibility -Field $field -ShowInNewForm $false -ShowInEditForm $false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment