Folders to consider for exclusion in antivirus programs:
C:\Program Files\Microsoft Office Servers\14.0\Logs
C:\Program Files\Microsoft Office Servers\
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\
C:\Program Files\Microsoft SQL Server
C:\Program Files (x86)\Microsoft SQL Server
Sources:
4.25.2014
4.10.2014
SharePoint 2010 - Enabling the Developer Dashboard
Enabling via powershell:
http://msdn.microsoft.com/en-us/library/office/gg512103(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/office/ff512745(v=office.14).aspx
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService $dashboardSetting = $contentService.DeveloperDashboardSettings $dashboardSetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On $dashboardSetting.Update()
http://msdn.microsoft.com/en-us/library/office/gg512103(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/office/ff512745(v=office.14).aspx
Labels:
Debugging,
Powershell,
SharePoint
3.26.2014
Free IT eBooks
All Categories
Microsoft
- http://social.technet.microsoft.com/wiki/contents/articles/11608.e-book-gallery-for-microsoft-technologies.aspx
- http://it-ebooks.info/publisher/8/
- http://blogs.msdn.com/b/mssmallbiz/archive/2013/06/28/almost-150-free-microsoft-ebooks-covering-windows-7-windows-8-office-2010-office-2013-office-365-office-web-apps-windows-server-2012-windows-phone-7-windows-phone-8-sql-server-2008-sql-server-2012-sharepoint-server-2010-s.aspx
Labels:
Books
2.13.2014
SharePoint 2010 - Formulas
Some resources for SharePoint formulas:
- http://office.microsoft.com/en-us/windows-sharepoint-services-help/CH001171117.aspx
- http://office.microsoft.com/en-us/support/results.aspx?ctags=CH010372694
- http://office.microsoft.com/en-us/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx
Labels:
Formulas,
SharePoint,
Validation
2.03.2014
Powershell - File Renaming
Here is a quick powershell script to tidy files that are not properly formatted for the web.
Get-ChildItem C:\Temp\rename\* -Recurse | Rename-Item -NewName {$_.name -creplace '[^A-Za-z1234567890.]','_' }
Get-ChildItem C:\Temp\rename\* -Recurse | Rename-Item -NewName {$_.name -replace '___','_' }
Get-ChildItem C:\Temp\rename\* -Recurse | Rename-Item -NewName {$_.name -replace '__','_' }
Labels:
Powershell
1.29.2014
SharePoint 2010 - InfoPath - Web Browser Settings
There is a glitch in the form rendering processes. Even with all the apparent settings set correctly in Central Admin and in the Form Library itself, the form still tries to open in the client filler application. There are some workarounds.
- Add this query parameter to the URL string. (Documentation)
https://intranet.mysite.org/FormLibrary/Forms/template.xsn?OpenIn=Browser - Using powershell to force the settings on the library:
http://technet.microsoft.com/en-us/library/ff805082(v=office.14).aspx
Set-SPInfoPathFormsService -AllowUserFormBrowserRendering $true
Labels:
InfoPath,
SharePoint
1.16.2014
SharePoint 2010 - Permissions on Views
Here are two excellent articles regarding specialized permissions on list views:
Labels:
SharePoint
1.10.2014
Powershell - Transferring Files from Server to Server
This is a nice little trick to get powershell to transfer files from one server directly without using domain admin credentials, or setting up an intermediary share directory. The credentials here are for the destination server. This creates a temporary network shared drive on the source server, transfers the file, then removes the shared directory.
$DriveUsername = "SERVER\USERNAME" $DrivePassword = "PASSWORD" $LocalFile = "C:\DIRECTORY\FILENAME.csv" $Drive = "T:" $RemoteFile = "$Drive\FILENAME.csv" $UNC = "\\10.10.10.10\C$\DIRECTORY" $net = new-object -ComObject WScript.Network $net.MapNetworkDrive($Drive, $UNC, $false, $DriveUsername, $DrivePassword) Copy-Item $LocalFile $RemoteFile $net.removenetworkdrive($Drive)
Labels:
Powershell
10.17.2013
SharePoint 2010 - Metatag Visibility Access
By default it would appear that the taxonomy information is not readily visible to all users, outside of the administrator. This list hidden list requires the following permissions:
https://servername/Lists/TaxonomyHiddenList/
https://servername/Lists/TaxonomyHiddenList/
- NT AUTHORITY\authenticated users Read
- System Account (SHAREPOINT\system) Full Control
Labels:
SharePoint
10.16.2013
SharePoint 2010 - InfoPath Time Picker
Creating a time picker in InfoPath is a real pain. I opted to not create the sharepoint lists and just load the options manually within the form. To pull this off you need to create 4 fields.
concat(mDatePicker, “T”, mHourPicker, “:”, mMinutePicker, “:00″)
This article does explain it quite well.
http://www.moderntoad.com/2012/02/23/infopath-date-hour-and-minute-picker-to-replicate-sharepoint-experience/
- MyDateTime = DateTime control. The final location of the information. Not actually used in the form. Just a container for storage.
- mDatePicker = Date control.
- mHourPicker = Text box in drop down format. Options are 00 - 23.
- mTimePicker = Text box in drop down format. Options are 00,15,30,45.
concat(mDatePicker, “T”, mHourPicker, “:”, mMinutePicker, “:00″)
This article does explain it quite well.
http://www.moderntoad.com/2012/02/23/infopath-date-hour-and-minute-picker-to-replicate-sharepoint-experience/
Labels:
InfoPath,
SharePoint
9.30.2013
SharePoint 2010 - Chrome Compatibility Fix
This little gem works really well at getting Chrome to load javascript correctly. IE8 does not like this and will throw an error.
http://withinsharepoint.com/archives/256
<!--[if !IE]><!-->
<script type="text/javascript">
window[addEventListener ? 'addEventListener' : 'attachEvent'](addEventListener ? 'load' : 'onload', function(){
if(_spBodyOnLoadWrapper){
_spBodyOnLoadWrapper();
}
});
</script>
<!--<![endif]-->
http://royaltutorials.com/sharepoint-2010-javascriptribbon-not-working-in-chrome/http://withinsharepoint.com/archives/256
Labels:
Chrome,
Javascript,
SharePoint
9.27.2013
SharePoint 2010 - Javascript Client Object Model
The following working example uses Javascript, JQuery, and CAML.
http://msdn.microsoft.com/en-us/library/jj245759.aspx
http://www.sharepointnutsandbolts.com/2010/10/sp2010-ajaxpart-2-using-javascript.html
======================================================
http://msdn.microsoft.com/en-us/library/jj245759.aspx
http://www.sharepointnutsandbolts.com/2010/10/sp2010-ajaxpart-2-using-javascript.html
======================================================
<div style="padding: 20px;">
<hr />
<h3>
Calculate Total Subs Reserved for a Single Day (Pending/Approved)</h3>
<table border="0" cellpadding="0" cellspacing="4">
<tbody>
<tr>
<td height="55"><input class="input-small search-query" id="targetDay" maxlength="10" name="targetDay" placeholder="YYYY-MM-DD" style="font-size: 150%;" type="text" /></td>
<td width="80"><button class="btn btn-primary" id="btnGo" type="button">GO</button></td>
<td width="200"><div id="totalSubsResults" style="color: red; font-weight: bold;">
</div>
</td>
</tr>
</tbody></table>
<hr />
</div>
<script type="text/javascript">
var allDocs;
var GUIDSubStartDate = "_a3909a47_509a_47e3_a9e7_2e149c274379";
var GUIDSubEndDate = "_fa7b1c2e_5d62_4edc_a3bd_aa41c9da2003";
var GUIDSubNumber = "_c0232d29_8c9c_4c08_bf02_3ade22e7d14f";
$('#btnGo').click(function () {
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
});
function sharePointReady() {
//var currentDay = '2013-10-23'
var currentDay = $('#targetDay').val();
//var ctx = new SP.ClientContext.get_current();
var ctx = new SP.ClientContext;
var targetList = ctx.get_web().get_lists().getByTitle('PDR');
//var query = SP.CamlQuery.createAllItemsQuery();
//allDocs = targetList.getItems(query);
//ctx.load(allDocs);
var query = new SP.CamlQuery();
query.set_viewXml("<view><query><where><and><neq><fieldref Name='ApprovalStatus' /><value Type='Choice'>REJECTED</Value></Neq><and><leq><fieldref Name='" + GUIDSubStartDate + "' /><value IncludeTimeValue='FALSE' Type='DateTime'>" + currentDay + "</Value></Leq><geq><fieldref Name='" + GUIDSubEndDate + "' /><value IncludeTimeValue='FALSE' Type='DateTime'>" + currentDay + "</Value></Geq></And></And></Where></Query></View>");
allDocs = targetList.getItems(query);
ctx.load(allDocs);
ctx.executeQueryAsync(Function.createDelegate(this, getDocsAllItemsSuccess), Function.createDelegate(this, getDocsAllItemsFailure));
}
function getDocsAllItemsSuccess(sender, args) {
var totalSubsNumber = 0;
var listEnumerator = allDocs.getEnumerator();
// Loop Over Records ------------
while (listEnumerator.moveNext()) {
var mySubsNumber = listEnumerator.get_current().get_item(GUIDSubNumber);
//$('#detailsSubResults').append(mySubsNumber + '<br />');
totalSubsNumber += mySubsNumber;
}
// Output Total ------------------
//alert(totalSubsNumber);
$("#totalSubsResults").fadeOut(500, function() {
$(this).html("<table cellpadding=3 cellspacing=0 border=0 align=right>
<tr><td><span style=font-size:350%>"+totalSubsNumber+"</span></td><td><span style=font-size:125%>SUBS<br/>RESERVED</span></td></tr>
</table>
");
$(this).fadeIn(500);
});
}
function getDocsAllItemsFailure(sender, args) {
alert('Failed to get list items. \nError: ' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace());
}
</script>
Labels:
CAML,
Client Object Model,
Javascript,
jQuery,
SharePoint
SQL Server - Recovering TempDB Space
-- STEP 01 ALTER FILE SPECS =====================================
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, SIZE=100Mb);
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, SIZE=100Mb);
GO
-- STEP 02 SHRINK FILES ========================================
USE tempdb
GO
DBCC shrinkfile (tempdev, 100)
GO
DBCC shrinkfile (templog, 100)
GO
http://www.sqldbadiaries.com/2010/11/13/tempdb-please-allow-me-to-shrink-you/
http://www.dbadiaries.com/how-to-shrink-tempdb
http://support.microsoft.com/kb/307487
http://technet.microsoft.com/en-us/library/ms175527(v=SQL.105).aspx
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, SIZE=100Mb);
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, SIZE=100Mb);
GO
-- STEP 02 SHRINK FILES ========================================
USE tempdb
GO
DBCC shrinkfile (tempdev, 100)
GO
DBCC shrinkfile (templog, 100)
GO
http://www.sqldbadiaries.com/2010/11/13/tempdb-please-allow-me-to-shrink-you/
http://www.dbadiaries.com/how-to-shrink-tempdb
http://support.microsoft.com/kb/307487
http://technet.microsoft.com/en-us/library/ms175527(v=SQL.105).aspx
Labels:
SQL,
SQL Server
7.31.2013
AD Computer Object Auditing
http://social.technet.microsoft.com/Forums/windowsserver/en-US/6a1abda4-0628-43b5-8e08-492220cbae7b/how-best-to-return-an-active-directory-computers-ip-address
http://technet.microsoft.com/en-us/library/hh849958.aspx
http://technet.microsoft.com/en-us/library/ee617195.aspx
http://technet.microsoft.com/en-us/library/dd378937(WS.10).aspx
http://technet.microsoft.com/en-us/library/ee449475(WS.10).aspx
http://blogs.technet.com/b/askds/archive/2009/08/27/the-ad-recycle-bin-understanding-implementing-best-practices-and-troubleshooting.aspx
http://technet.microsoft.com/en-us/library/dd378937(v=ws.10).aspx
http://community.spiceworks.com/topic/269471-how-to-enable-active-directory-module-for-windows-powershell-via-script
http://technet.microsoft.com/en-us/library/ee617192.aspx
http://blogs.technet.com/b/askds/archive/2010/02/04/inventorying-computers-with-ad-powershell.aspx
=====================
Get-ADComputer -Filter * -Property * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion,IPv4Address | Export-CSV c:\AllComputerObjects.csv -NoTypeInformation -Encoding UTF8
Get-ADComputer -Filter * -Property * | Select-Object * | Export-CSV c:\AllComputerObjects.csv -NoTypeInformation -Encoding UTF8
http://technet.microsoft.com/en-us/library/hh849958.aspx
http://technet.microsoft.com/en-us/library/ee617195.aspx
http://technet.microsoft.com/en-us/library/dd378937(WS.10).aspx
http://technet.microsoft.com/en-us/library/ee449475(WS.10).aspx
http://blogs.technet.com/b/askds/archive/2009/08/27/the-ad-recycle-bin-understanding-implementing-best-practices-and-troubleshooting.aspx
http://technet.microsoft.com/en-us/library/dd378937(v=ws.10).aspx
http://community.spiceworks.com/topic/269471-how-to-enable-active-directory-module-for-windows-powershell-via-script
http://technet.microsoft.com/en-us/library/ee617192.aspx
http://blogs.technet.com/b/askds/archive/2010/02/04/inventorying-computers-with-ad-powershell.aspx
=====================
Get-ADComputer -Filter * -Property * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion,IPv4Address | Export-CSV c:\AllComputerObjects.csv -NoTypeInformation -Encoding UTF8
Get-ADComputer -Filter * -Property * | Select-Object * | Export-CSV c:\AllComputerObjects.csv -NoTypeInformation -Encoding UTF8
Labels:
Active Directory,
Powershell
6.27.2013
Free Stuff
Chrome Extension - Chrome Commander
Simple chrome extension that launches all of Google's search, office, services, software & resources. I got tired of trying to keep track of them all by memory. (shortcuts / bookmarks / favorites)
Python Script - pydev-googleapps-site
Simple chrome extension that launches all of Google's search, office, services, software & resources. I got tired of trying to keep track of them all by memory. (shortcuts / bookmarks / favorites)
Python Script - pydev-googleapps-site
The intent of this project is to download Sites information via Google’s API. I put together this code because of two reasons:
- Google’s support of .Net is lacking. Python became the path of least resistance.
- There is an undocumented limit of 500 results per site feed request imposed by Google. They have a “max-results” option which one would believe actually returns all results, but it doesn’t.
Labels:
Chrome Extension,
FREE,
Python
5.31.2013
SQL Server Performance
For SQL Server Box:
1) Configure AV to ignore several key folders and files. Such own AV folder, SQL folders, SQL files, c:\pagefile.sys
2) Change power management option from balanced to performance.
3) Do not use SQL Boost.
4) Put SQL data files on separate drive.
5) Put SQL log files on separate drive, if possible.
6) Use simple database unless full logging is required.
Labels:
SQL Server
4.16.2013
InfoPath - Line Breaks on Calculated Values
File this one under A for annoying. However, this work around does work for creating multiline, calculated textbox values without resorting to C# code.
http://blogs.msdn.com/b/infopath/archive/2005/03/04/385577.aspx
http://blogs.msdn.com/b/infopath/archive/2005/03/04/385577.aspx
Labels:
InfoPath
4.13.2013
Cutting the Cable Cord
Software:
http://www.nextpvr.com/
http://www.sagetv.com/
http://www.mythtv.org/
Articles:
http://lifehacker.com/5981757/how-to-watch-and-record-live-tv-on-your-xbmc-media-center
http://wiki.xbmc.org/index.php?title=PVR
TV Tuner Products:
http://www.silicondust.com/products/hdhomerun/atsc/
http://www.amazon.com/Avertv-Hybrid-Volar-Windows-MTVHVMXSK/dp/B002U6KT8U/ref=sr_1_4?ie=UTF8&qid=1365917572&sr=8-4&keywords=hauppauge+usb
http://www.hauppauge.com/site/products/data_hvr950q.html
Antenna Products:
http://www.amazon.com/Antennas-Direct-ClearStream4-HDTV-Antenna/dp/B001BRXW74/ref=sr_1_4?ie=UTF8&qid=1365918031&sr=8-4&keywords=hdtv+antenna
http://www.newegg.com/Product/Product.aspx?Item=9SIA0SF0D06877
http://www.newegg.com/Product/Product.aspx?Item=9SIA1PC0JK3907
http://www.nextpvr.com/
http://www.sagetv.com/
http://www.mythtv.org/
Articles:
http://lifehacker.com/5981757/how-to-watch-and-record-live-tv-on-your-xbmc-media-center
http://wiki.xbmc.org/index.php?title=PVR
TV Tuner Products:
http://www.silicondust.com/products/hdhomerun/atsc/
http://www.amazon.com/Avertv-Hybrid-Volar-Windows-MTVHVMXSK/dp/B002U6KT8U/ref=sr_1_4?ie=UTF8&qid=1365917572&sr=8-4&keywords=hauppauge+usb
http://www.hauppauge.com/site/products/data_hvr950q.html
Antenna Products:
http://www.amazon.com/Antennas-Direct-ClearStream4-HDTV-Antenna/dp/B001BRXW74/ref=sr_1_4?ie=UTF8&qid=1365918031&sr=8-4&keywords=hdtv+antenna
http://www.newegg.com/Product/Product.aspx?Item=9SIA0SF0D06877
http://www.newegg.com/Product/Product.aspx?Item=9SIA1PC0JK3907
4.11.2013
Rubber Stamp Pattern
Here is a great tutorial for creating a rubber stamp effect.
http://graphicssoft.about.com/od/photoshop/ss/Rubber-Stamp-PS_15.htm
http://graphicssoft.about.com/od/photoshop/ss/Rubber-Stamp-PS_15.htm
Labels:
Photoshop
4.08.2013
InfoPath 2010 - DateDiff
InfoPath dates are stored in the format YYYY-MM-DD
To extract the day number of a date:
number(substring(field1, 9, 2))
To extract the month number of a date:
number(substring(field1, 6, 2))
To extract the year number of a date:
number(substring(field1, 1, 4))
To extract the day number of a date:
number(substring(field1, 9, 2))
To extract the month number of a date:
number(substring(field1, 6, 2))
To extract the year number of a date:
number(substring(field1, 1, 4))
Labels:
InfoPath
Subscribe to:
Posts (Atom)
