dahancock1

dahancock1

This user hasn't shared any profile information

Posts by dahancock1

SharePoint 2010 Retrieve All User Group Memberships

0

To view a list of all groups and user memberships for a certain SharePoint 2010 site collection try this PowerShell script. Be sure to change the name of the SharePoint site in the script under the $site variable.


[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = New-Object Microsoft.SharePoint.SPSite("http://server/sites/sitecollectionname")
$groups = $site.RootWeb.sitegroups
foreach ($mygroup in $groups)
{
"Group: " + $mygroup.name;
foreach ($user in $mygroup.users)
{
" User: " + $user.name
}
}
$site.Dispose()

Loving Firefox 14 Install

0

I just updated to firefox 14 and it’s working very well.  It has SSL connections when you do a search which is a very good feature.  It has cross platform plugins disabled so you don’t get browser plugin malware.  I was using chrome for a while but have gone back to my roots.  I really like the firefox sync so all my bookmarks on the browsers on multiple computers are all auto synced.  And firefox does not consume a ton of memory to run.  It also fills out my forms better than the other browsers.

July 9, 2012 Malware Detection and Removal

0

Thousands of people may loose their internet service on Monday, July 9, 2012 because of Malware that has been infecting computers from the internet and email.  The FBI helped setup a site to test your computer and show you how to fix it.

Step one.  Go to http://www.dcwg.org/detect/ and click on the circled link shown below.

You should see the below page:

 

If you don’t, go here: http://www.dcwg.org/fix/ and follow the instructions.

Get size of a SharePoint 2010 Database with the SQL Command sp_spaceused

1

Get the size of a SharePoint 2010 database with the SQL command sp_spaceused:

sp_spaceused

Enabling Remote WMI and DCOM by Command Line on Remote Computer

0

Enabling Remote WMI and DCOM for PowerShell Use
Many cmdlets have a built-in -ComputerName parameter that will allow for remote access without using the new PowerShell remoting. For this to work, your firewall will need to be adjusted on the target machine:
netsh firewall set service type = remoteadmin mode = enable
In addition, some cmdlets (like Get-Service) will need the Remote Registry service to be running on the target side:
Start-Service RemoteRegistry
Set-Service RemoteRegistry -StartupType Automatic

SharePoint 2010 PowerShell – List all timer job history a certain time range to CSV file

1

Since we wrote this script it has helped us get info about specific jobs really quickly. You can download this script here: SharePoint 2010 – Get Job History or copy it here:


cls
$test = Get-SPWebApplication "http://intranet/"
$myStartTime = "9/29/2011 12:30:00 AM"
$myStopTime = "9/29/2011 3:30:00 AM"


#GET ALL BETWEEN THAT TIME PERIOD
Write-Host "Fetching all jobs to JobHistoryOutput.csv for $myStartTime - $myStopTime..." -ForeGroundColor Red
$test.JobHistoryEntries | Where-Object {($_.StartTime -gt $myStartTime) -and ($_.StartTime -lt $myStopTime)} | Export-Csv JobHistoryOutput.csv –NoType
Write-Host "Done! Check JobHistoryOutput.csv for info." -ForeGroundColor Green


#GET ALL THAT FAILED BETWEEN THAT TIME PERIOD
Write-Host "Fetching all errors to JobHistoryOutputErrors.csv for $myStartTime - $myStopTime..." -ForeGroundColor Red
$test.JobHistoryEntries | Where-Object {($_.StartTime -gt $myStartTime) -and ($_.StartTime -lt $myStopTime) -and ($_.Status -ne 'Succeeded')} | Export-Csv JobHistoryOutputErrors.csv –NoType
Write-Host "Done! Check JobHistoryOutputErrors.csv for info." -ForeGroundColor Green



Retreiving SharePoint 2010 Jobs Details by Date and Time
1. Log onto your SharePoint 2010 application server with farm admin rights.
2. Run SharePoint Admin Shell.
3. Change the SharePoint application in the script on line 2 (mine was http://intranet). Change the dates and times in the scriptlines 3 and 4.
4. Run the script as shown below:

5. View output from the script:

6. You’ll get two files. C:\JobHistoryOutput.csv is all jobs. C:\JobHistoryOutputErrors.csv is jobs that didn’t get a “Succeeded” status. Sort and filter in excel for the results you want: JobDefinitionId, JobDefinitionTitle, WebApplicationId, WebApplicationName, ServiceId, ServerId, ServerName, Status, StartTime, EndTime, DatabaseName, ErrorMessage

Powershell to Get the count of user objects in Active Directory using LDAP Query

0

$Domain = ‘LDAP://DC=yourdomain;DC=com’
$Root = New-Object DirectoryServices.DirectoryEntry $Domain
$select = New-Object DirectoryServices.DirectorySearcher
$select.SearchRoot = $root
$adobj= $select.findall() |? {$_.properties.objectcategory -match “CN=Person”}
$adobj.count

For the $Domain variable change the “yourdomain” string to the name of your domain.

Missing “Column Ordering” in SharePoint 2010 List Settings

3

If you’re missing the “Column Ordering” setting in your SharePoint 2010 list settings then go to:

List settings -> Advanced Settings -> “Allow Management of Content Types?”

If already yes, change the radio button to “No” and press “Ok”.  Now check for the “Column ordering” link.

SharePoint 2010 Backups Woes

0

Wow what a huge DEAL!

Our SharePoint 2010 install (2 web Win2K8, 1 app Win2K8, and SQL server 2005) is being backed up via SQL backups and TSM system backups today.  This is not recommended by Microsoft to be “the option” because SharePoint can’t be put back together from these backups.  It would be missing the IIS deployment and configuration, the SharePoint application server installation, and more.
We explored using the Native Microsoft SharePoint 2010 backup tools but:

  • They cannot be scheduled to run from the GUI.  Some fancy powershell would work but…
  • We didn’t get a full platform level backup to complete successfully when we tried it.
  • There are not any easy to use granular restore options from backup in a GUI (PowerShell was the option but I didn’t explore).

So we started to evaluate AvePoint’s DocAve for backing up and administering SharePoint but ran into some road blocks:

  • The database admins highly recommended that we not install any trial software on a production database cluster server.  Performing a full platform level backup using DocAve was part of our new software evaluation check off list to but we are unable to complete this test because there is a DocAve Agent service that is required to be installed on the database server.
  • We were looking at moving the large BLOB content out of the HUGE statements content database using DocAve’s Archiver and then route new files to the SAN via DocAves Extender but these products require the MS 2008 Enterprise remote blob storage feature.  We are currently on SQL 2005.

So now we have to upgrade our current production SQL environment to MS 2008 Enterprise, then buy DocAve, and then we can finally back it up.  Oh and build a SharePoint test environment on some virtual machines too.  WHAT A HEADACHE!

 

Publishing MOSS 2007 “Windows SharePoint Services 3.0 Application Templates: All Templates” to Sharepoint 2010

0

The “Application Templates” (the .wsp files) can be directly deployed to SP2010 in the same manner in which you did it in MOSS2007 (“addsolution” then “deploysolution”).

The “Site Templates” (the .stp files) are no longer supported and must be migrated in the form of an actual site. The process for this would be to first create a site based on each of the templates you’ll want to use (in MOSS2007, or should be able to just bring up a quick deployment of WSS 3.0 and migrate it into SP2010 – havent tried though), migrate the site to SP2010, then save the site as a template to add it to the template store within SP2010 (from then on you’ll be able to create more sites from the same template).

For the “Application Templates” download the complete “All Templates” package (http://www.microsoft.com/downloads/en/details.aspx?familyId=5807B5EF-57A1-47CB-8666-78C1363F127D&hash=U7zPFGJoFxrcdUfx8q5LyWM9C7QgTt9Lz2N1LBkKSJCSHWDA1xGmWvG08XqPxn1%2bH4KlBTCVkFmKjyTTaVP94g%3d%3d), then run a batch file to deploy them all.

The batch file I used is as follows:

Code:

call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "AbsenceVacationSchedule.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\ApplicationTemplateCore.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "ApplicationTemplateCore" -allowgacdeployment -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\BudgetingTrackingMultipleProjects.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "BudgetingTrackingMultipleProjects.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\BugDatabase.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "BugDatabase.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\CallCenter.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "CallCenter.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\ChangeRequest.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "ChangeRequest.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\ComplianceProcessSupport.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "ComplianceProcessSupport.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\ContactsManagement.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "ContactsManagement.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\DocumentLibraryReview.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "DocumentLibraryReview.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\EventPlanning.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "EventPlanning.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\ExpenseReimbursementApproval.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "ExpenseReimbursementApproval.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\HelpDesk.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "HelpDesk.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\InventoryTracking.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "InventoryTracking.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\ITTeamWorkspace.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "ITTeamWorkspace.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\JobRequisition.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "JobRequisition.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\KnowledgeBase.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "KnowledgeBase.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\LendingLibrary.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "LendingLibrary.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\PhysicalAssetTracking.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "PhysicalAssetTracking.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\ProjectTrackingWorkspace.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "ProjectTrackingWorkspace.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\RoomEquipmentReservations.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "RoomEquipmentReservations.wsp" -allowgacdeployment -immediate -force
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\unpacked\SalesLeadPipeline.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name "SalesLeadPipeline.wsp" -allowgacdeployment -immediate -force

Copy the above into a “DeployTemplates.bat” file, and place all the “.wsp” templates into a folder called “C:\unpacked”.

The above is written for a Sharepoing 2010 deployment, so to make it work for MOSS2007, simply change the reference from the “14” to “12”, then it will work.

You should then be able to create new sites from each of these templates.

dahancock1's RSS Feed