Hello People,
The following is a code snippet from PowerShell to completely remove or delete a field in a SharePoint list. The code uses the GUID to find the field (column). I tested this with SharePoint 2010. Feel free to modify the code. :)
#Source Help - http://dotnetfollower.com/wordpress/2012/07/sharepoint-how-to-delete-a-list-fieldcolumn-programmatically/
$web=Get-SPWeb "http://mySite/"
$list=$web.Lists.TryGetList("My List Name")
if ($list -ne $null) {
foreach($column in $list.Fields){
if ($column.Id -eq "[GUID]") {
write-host -f green "Deleting column with Internal name as : " $column.InternalName
if ($column.ReadOnlyField)
{
$column.ReadOnlyField = $false;
$column.Update()
}
if ($column.Hidden)
{
$column.Hidden = $false;
$column.Update()
}
if ($column.AllowDeletion -eq $null -or !$column.AllowDeletion.Value)
{
$column.AllowDeletion = $true
$column.Update()
}
$column.Delete()
$column.ParentList.Update()
}
}
}
else
{
write-host "list is null"
}
I believe all of you have been stuck on printers where you send files to the printer, But they do not actually print. And later pm you try to delete the file to be printed in the printer tray and they just keep on saying deleting.
Well here is an executable file that will remove the files in the printer tray. No more printer troubles. :D
Herewith I have created a windows application to create empty files with a specific file size. This tool can be used for testing purposes of file upload control of web applications and etc.
Hello Guys,
I have developed a small windows form application to run a PowerShell script file. I havent done many of windows form applications.
The application will only run a script. It will not call any function on the script unless the script it self is calling the functions.
The command "write-host" will give an error if it mentioned on the script. Therefore change the "write-host" commands to "write-output" in your script. "write-output" will actually send an output to the text window.
Recently I was using RadSchedular on an application page for SharePoint. I came across this weird problem on the navigation of the RadSchedular. i.e "Day", "Week", "Month" etc. I can switch it once, but afterwards I cannot switch it back. I noticed an script error shown in the browser as.
" Scriptresource.axd of the property 'Model': object is null "
So I googled and found a similar problem in the Telerik forum
This video was made by one of my clan mate (clan : n00b Alliance). The clips were taken at SLCG (Sri Lanka Cyber Games) 2012.
SLCG had lots of sponsors and a lot of competitors participating for games such as COD4, CS, NFS Most Wanted, Dota and some other console games. In Sri Lanka, COD4 is much more popular these days. There are plenty of clans that are into COD4.
For more information about Sri Lankan E-Sports, Surf to http://gamer.lk/
I am not in the gaming scene anymore though... But I do have all the gaming gear i'll ever need ;-) .
n00b!