Skip to content

Instantly share code, notes, and snippets.

View IAMPetro's full-sized avatar

IAMPetro IAMPetro

View GitHub Profile
@IAMPetro
IAMPetro / SharePoint.ImportingLists.Example2.ps1
Created December 12, 2016 02:08
SharePoint: Importing SharePoint Libraries & Lists
# Example - We will Import the Library exported above into the "Organizational Reports"
# team site located in a different Site Collection called "Reporting"
# The destination URL is http://intranet.contoso.com/sites/Reporting/OrganizationalReports
Import-SPWeb -Identity http://intranet.contoso.com/sites/Reporting/OrganizationalReports -path "C:\Exports\FinanceDepartment_ReportsLibrary.cmp"
@IAMPetro
IAMPetro / SharePoint.ImportingLists.Example1.ps1
Created December 12, 2016 02:08
SharePoint: Importing SharePoint Libraries & Lists
# This will Import a Library saved on the SharePoint Servers disk into a team site.
Import-SPWeb -Identity http://<SharePoint>/sites/<siteCollection>/<siteName> -path "<destinationFolder\fileName.cmp>"
@IAMPetro
IAMPetro / SharePoint.GAC.Example6.ps1
Created December 12, 2016 02:05
SharePoint: Recompiling a DLL from the GAC
# Searches through the Directory specified above
dir <fileName> /s
# Heres what we could have used to search for the DLL initially
dir Microsoft.SharePoint.Powershell.dll /s
@IAMPetro
IAMPetro / SharePoint.GAC.Example5.ps1
Created December 12, 2016 02:04
SharePoint: Recompiling a DLL from the GAC
# This Changes the Directory to a folder I believe might contain what I'm looking for
cd \windows\
@IAMPetro
IAMPetro / SharePoint.GAC.Example4.ps1
Created December 12, 2016 02:04
SharePoint: Recompiling a DLL from the GAC
# Export the DLL to the local drive
copy *.dll C:\<preferred folder>\
@IAMPetro
IAMPetro / SharePoint.GAC.Example3.ps1
Created December 12, 2016 02:03
SharePoint: Recompiling a DLL from the GAC
# Use the Change Directory command to enter the version folder
cd 14.0.0.0__71e9bce111e9429c
@IAMPetro
IAMPetro / SharePoint.GAC.Example2.ps1
Created December 12, 2016 02:03
SharePoint: Recompiling a DLL from the GAC
# First locate the Microsoft.SharePoint.PowerShell DLLs directory
cd Microsoft.SharePoint.PowerShell
# Second we need to obtain the version + public token string
dir
@IAMPetro
IAMPetro / SharePoint.GAC.Example1.ps1
Created December 12, 2016 02:02
SharePoint: Recompiling a DLL from the GAC
#This Changes the Directory to the GAC Assembly folder
cd \windows\assembly\GAC_MSIL
@IAMPetro
IAMPetro / SharePoint.Kerberos.Example6.ps1
Created December 12, 2016 02:00
SharePoint: Kerberos Authentication Part 3
# This command will delete all of the Kerberos tickets held by the logged in user
klist purge
@IAMPetro
IAMPetro / SharePoint.Kerberos.Example5.ps1
Created December 12, 2016 02:00
SharePoint: Kerberos Authentication Part 3
#This will list all of the Kerberos tickets held by the currently logged in user
klist