#The following powershell script will start the stopped apppools, the excluded a appools can be included in place of "Devtesting". Also this script will be in sleep mode in every 300 sec
===================================================================
Import-Module WebAdministration
$logPath = "D:\AppPool\logs\iis-recycle-" + (Get-Date).ToShortDateString() -replace "/","-"
$logPath += ".txt"
#Specify the time counter over here
$TimeCounter = 300
#Run in Infinite Loop
While ($true)
{
$Date = Get-Date
Write-Output $date | Out-File -FilePath $logPath -Append
$AppPools = Get-WmiObject -Class IIsApplicationPool -Namespace "root/MicrosoftIISv2" | Select-Object -property @{N="Name";E={$name = $_.Name; $name.Split("/")[2] }}
$ApppoolsEXclude = $AppPools | where-object {$_.Name -ne "Devtesting"}
foreach($Pool in $AppPoolsExclude)
{
$PoolName = $pool.Name
$State = Get-WebAppPoolState -Name $PoolName
$StateValue = $State.Value
if($StateValue -eq "Stopped")
{
Write-Output "Found $PoolName as $StateValue. Proceeding to start..." | Out-File -FilePath $logPath -Append
Start-WebAppPool -Name $PoolName
if(-not $?)
{
Write-Output "Encountered an error. Pls check manually." | Out-File -FilePath $logPath -Append
}
else
{
Write-Output "Started" | Out-File -FilePath $logPath -Append
}
}
else
{
}
}
Write-Output "Proceeding to sleep for $TimeCounter seconds." | Out-File -FilePath $logPath -Append
Sleep $TimeCounter
}
SharePoint has many Lists. Following is a list of BaseTemplateType of some of the SharePoint List that I know for a quick reference.
Notused | -1 |
NoListTemplate | 0 |
GenericList | 100 |
DocumentLibrary | 101 |
Survey | 102 |
Links | 103 |
Announcements | 104 |
Contacts | 105 |
Events | 106 |
Tasks | 107 |
DiscussionBoard | 108 |
PictureLibrary | 109 |
DataSources | 110 |
WebTemplateCatalog | 111 |
UserInformation | 112 |
WebPartCatalog | 113 |
ListTemplateCatalog | 114 |
XMLForm | 115 |
MasterPageCatalog | 116 |
NoCodeWorkflows | 117 |
WorkflowProcess | 118 |
WebPageLibrary | 119 |
CustomGrid | 120 |
SolutionCatalog | 121 |
NoCodePublic | 122 |
ThemeCatalog | 123 |
DesignCatalog | 124 |
AppDataCatalog | 125 |
DataConnectionLibrary | 130 |
WorkflowHistory | 140 |
GanttTasks | 150 |
HelpLibrary | 151 |
AccessRequest | 160 |
TasksWithTimelineAndHierarchy | 171 |
MaintenanceLogs | 175 |
Meetings | 200 |
Agenda | 201 |
MeetingUser | 202 |
Decision | 204 |
MeetingObjective | 207 |
TextBox | 210 |
ThingsToBring | 211 |
HomePageLibrary | 212 |
Posts | 301 |
Comments | 302 |
Categories | 303 |
Facility | 402 |
Whereabouts | 403 |
CallTrack | 404 |
Circulation | 405 |
Timecard | 420 |
Holidays | 421 |
IMEDic | 499 |
Microfeed | 544 |
ExternalList | 600 |
MySiteDocumentLibrary | 700 |
PublishingPageLibrary | 850 |
PublishingImageLibrary | 851 |
IssueTracking | 1100 |
AdminTasks | 1200 |
HealthRules | 1220 |
HealthReports | 1221 |
DeveloperSiteDraftApps | 1230 |
PersonalDocumentLibrary | 2002 |
PrivateDocumentLibrary | 2003 |