Shared Points

items of some interest

January, 2013

  • SharePoint - SPmonitoredScope - Dashboard

    In order for custom code to show up in the dev dashboard you need to make use of the SpMonitoredScope: using ( new SPMonitoredScope(“My Scope Name”)) { doSomeWork(); } http://msdn.microsoft.com/en-us/library/ff512758.aspx We have...
  • Windows - BeatUp-Windows - stress memory and cpu's

    # BeatUp-Windows.ps1 # $psProcess = gps -id $PID $psInstances = (gps -Name $psProcess.name).count if ($psInstances -gt 1) { $psName = "{0}#{1}" -f $psProcess.name,$($psInstances - 1) } else { $psName = $psProcess.name } # RAM in box $box=get-WMIobject...
  • SharePoint - AV scanning SharePoint.

    Make sure you tell it to ignore your search indexes and other SharePoint areas! See: http://support.microsoft.com/kb/952167 To be sure it is not hitting your index location, you can check where that is currently set by: Central Admin -> Application...
  • Windows - Get-WindowsUpdateLog

    # Get-WindowsUpdateLog.ps1 # walk the WindowsUpdate.log to list the # Security Updates that have been installed. # [anything][PatchDate][anything][matchtext][PatchText] $PATTERN = "([^\n]+\}\t)" $PATTERN += "(?<PatchDate>[0-9]{4}-[0-9]{2}-[0...
  • SharePoint - import a picture from AD for the user profile

    Consider the following scenario. You have JPG pictures in AD, stored with the users thumbnailPhoto attribute. You try to import pictures for a user profile from the Active Directory thumbnailPhoto attribute, to store within the Picture attribute in Microsoft...
  • PowerShell - add a JPG into AD for the user photo

    # Update-AD-Picture.ps1 # # copy a .jpg into a byte array, then push that into # the "thumbnailPhoto" property of the specified user in AD function UpDate-AD-Picture { param ([STRING] $UserName, [STRING] $JPEGfilePath) if ( ($JPEGfilePath) -and...