Category Archives: powershell script

Retrive account password powershell

Start SharePoint Service Application Proxy using Powershell

If your Usage and Health Data Collection Proxy is in a stopped state here is a quick bit of PowerShell to to get it started:

$sap = Get-SPServiceApplicationProxy | where-object {$_.TypeName -eq “Usage and Health Data Collection Proxy”}
$sap.Provision()

The above can easily be adapted to allow you to start any Service Application Proxy

Advertisements
Advertisements
Advertisements
Basic powershell cmdlet sharepoint 1920x1080

Basic powershell cmdlet sharepoint

Advertisements
Advertisements

Basic powershell cmdlet sharepoint

Below are the very basic powershell cmdlet for sharepoint which would be very helpful.

Get-Command -Noun SP*
Get-Help Get-SPSite
Get-Help Get-SPSite -Examples
PS C:\Users\de.prasad.adm> Get-Command -Noun SPSite

CommandType Name ModuleName


Backup-SPSite Microsoft.SharePoint.PowerShell
Copy-SPSite Microsoft.SharePoint.PowerShell
Get-SPSite Microsoft.SharePoint.PowerShell
Move-SPSite Microsoft.SharePoint.PowerShell
New-SPSite Microsoft.SharePoint.PowerShell
Remove-SPSite Microsoft.SharePoint.PowerShell
Repair-SPSite Microsoft.SharePoint.PowerShell
Restore-SPSite Microsoft.SharePoint.PowerShell
Set-SPSite Microsoft.SharePoint.PowerShell
Test-SPSite Microsoft.SharePoint.PowerShell
Upgrade-SPSite Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPWeb

CommandType Name ModuleName


Export-SPWeb Microsoft.SharePoint.PowerShell
Get-SPWeb Microsoft.SharePoint.PowerShell
Import-SPWeb Microsoft.SharePoint.PowerShell
New-SPWeb Microsoft.SharePoint.PowerShell
Remove-SPWeb Microsoft.SharePoint.PowerShell
Set-SPWeb Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPWebApplication

CommandType Name ModuleName


Convert-SPWebApplication Microsoft.SharePoint.PowerShell
Get-SPWebApplication Microsoft.SharePoint.PowerShell
New-SPWebApplication Microsoft.SharePoint.PowerShell
Remove-SPWebApplication Microsoft.SharePoint.PowerShell
Set-SPWebApplication Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPServiceApplication

CommandType Name ModuleName


Get-SPServiceApplication Microsoft.SharePoint.PowerShell
Publish-SPServiceApplication Microsoft.SharePoint.PowerShell
Remove-SPServiceApplication Microsoft.SharePoint.PowerShell
Set-SPServiceApplication Microsoft.SharePoint.PowerShell
Unpublish-SPServiceApplication Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPServiceApplicationPool

CommandType Name ModuleName


Get-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
Cmdlet New-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
Cmdlet Set-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPContentDatabase

CommandType Name ModuleName


Cmdlet Dismount-SPContentDatabase Microsoft.SharePoint.PowerShell
Get-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Mount-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet New-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Set-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Test-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Upgrade-SPContentDatabase Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPDatabase

CommandType Name ModuleName


Get-SPDatabase Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPManagedAccount

CommandType Name ModuleName


Get-SPManagedAccount Microsoft.SharePoint.PowerShell
New-SPManagedAccount Microsoft.SharePoint.PowerShell
Remove-SPManagedAccount Microsoft.SharePoint.PowerShell
Set-SPManagedAccount Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun STimerJob
PS C:\Users\de.prasad.adm> Get-Command -Noun SPTimerJob

CommandType Name ModuleName


Disable-SPTimerJob Microsoft.SharePoint.PowerShell
Enable-SPTimerJob Microsoft.SharePoint.PowerShell
Get-SPTimerJob Microsoft.SharePoint.PowerShell
Set-SPTimerJob Microsoft.SharePoint.PowerShell
Start-SPTimerJob Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPUser

CommandType Name ModuleName


Get-SPUser Microsoft.SharePoint.PowerShell
Move-SPUser Microsoft.SharePoint.PowerShell
New-SPUser Microsoft.SharePoint.PowerShell
Remove-SPUser Microsoft.SharePoint.PowerShell
Set-SPUser Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun WebApplication

CommandType Name ModuleName


ConvertTo-WebApplication WebAdministration
Get-WebApplication WebAdministration
New-WebApplication WebAdministration
Remove-WebApplication WebAdministration
PS C:\Users\de.prasad.adm> Get-Command -Noun SPProcessAccount

CommandType Name ModuleName


Get-SPProcessAccount Microsoft.SharePoint.PowerShell

PS C:\Users\de.prasad.adm> Get-Command -Verb Get

Get-PfxCertificate Microsoft.PowerShell.Security
Get-PfxData PKI
Get-Process Microsoft.PowerShell.Management
Get-PSBreakpoint Microsoft.PowerShell.Utility
Get-PSCallStack Microsoft.PowerShell.Utility
Get-PSDrive Microsoft.PowerShell.Management
Get-PSProvider Microsoft.PowerShell.Management
Get-PSSession Microsoft.PowerShell.Core
Get-PSSessionConfiguration Microsoft.PowerShell.Core
Get-PSSnapin Microsoft.PowerShell.Core
Get-Random Microsoft.PowerShell.Utility
Get-ScheduledJob PSScheduledJob
Get-ScheduledJobOption PSScheduledJob
Get-SecureBootPolicy SecureBoot
Get-SecureBootUEFI SecureBoot
Get-Service Microsoft.PowerShell.Management
Get-SPAccessServiceApplication Microsoft.SharePoint.PowerShell
Get-SPAccessServicesApplication Microsoft.SharePoint.PowerShell
Get-SPAccessServicesDatabase Microsoft.SharePoint.PowerShell
Get-SPAccessServicesDatabaseServer Microsoft.SharePoint.PowerShell
Get-SPAccessServicesDatabaseServerGroup Microsoft.SharePoint.PowerShell
Get-SPAccessServicesDatabaseServerGroupMapping Microsoft.SharePoint.PowerShell
Get-SPAlternateURL Microsoft.SharePoint.PowerShell
Get-SPAppAcquisitionConfiguration Microsoft.SharePoint.PowerShell
Get-SPAppAutoProvisionConnection Microsoft.SharePoint.PowerShell
Get-SPAppDeniedEndpointList Microsoft.SharePoint.PowerShell
Get-SPAppDisablingConfiguration Microsoft.SharePoint.PowerShell
Get-SPAppDomain Microsoft.SharePoint.PowerShell
Get-SPAppHostingQuotaConfiguration Microsoft.SharePoint.PowerShell
Get-SPAppInstance Microsoft.SharePoint.PowerShell
Get-SPAppPrincipal Microsoft.SharePoint.PowerShell
Get-SPAppScaleProfile Microsoft.SharePoint.PowerShell
Get-SPAppSiteSubscriptionName Microsoft.SharePoint.PowerShell
Get-SPAppStateSyncLastRunTime Microsoft.SharePoint.PowerShell
Get-SPAppStateUpdateInterval Microsoft.SharePoint.PowerShell
Get-SPAppStoreConfiguration Microsoft.SharePoint.PowerShell
Get-SPAuthenticationProvider Microsoft.SharePoint.PowerShell
Get-SPAuthenticationRealm Microsoft.SharePoint.PowerShell
Get-SPBackupHistory Microsoft.SharePoint.PowerShell
Get-SPBingMapsBlock Microsoft.SharePoint.PowerShell
Get-SPBingMapsKey Microsoft.SharePoint.PowerShell
Get-SPBrowserCustomerExperienceImprovementProgram Microsoft.SharePoint.PowerShell
Get-SPBusinessDataCatalogEntityNotificationWeb Microsoft.SharePoint.PowerShell
Get-SPBusinessDataCatalogMetadataObject Microsoft.SharePoint.PowerShell
Get-SPBusinessDataCatalogThrottleConfig Microsoft.SharePoint.PowerShell
Get-SPCertificateAuthority Microsoft.SharePoint.PowerShell
Get-SPClaimProvider Microsoft.SharePoint.PowerShell
Get-SPClaimProviderManager Microsoft.SharePoint.PowerShell
Get-SPClaimTypeEncoding Microsoft.SharePoint.PowerShell
Get-SPContentDatabase Microsoft.SharePoint.PowerShell
Get-SPContentDeploymentJob Microsoft.SharePoint.PowerShell
Get-SPContentDeploymentPath Microsoft.SharePoint.PowerShell
Get-SPCustomLayoutsPage Microsoft.SharePoint.PowerShell
Get-SPDatabase Microsoft.SharePoint.PowerShell
Get-SPDataConnectionFile Microsoft.SharePoint.PowerShell
Get-SPDataConnectionFileDependent Microsoft.SharePoint.PowerShell
Get-SPDeletedSite Microsoft.SharePoint.PowerShell
Get-SPDesignerSettings Microsoft.SharePoint.PowerShell
Get-SPDiagnosticConfig Microsoft.SharePoint.PowerShell
Get-SPDiagnosticsPerformanceCounter Microsoft.SharePoint.PowerShell
Get-SPDiagnosticsProvider Microsoft.SharePoint.PowerShell
Get-SPDistributedCacheClientSetting Microsoft.SharePoint.PowerShell
Get-SPEduServiceSetting Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchAdministrationComponent Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchComponent Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchContentEnrichmentConfigur... Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchCrawlContentSource Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchCrawlCustomConnector Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchCrawlDatabase Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchCrawlExtension Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchCrawlLogReadPermission Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchCrawlMapping Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchCrawlRule Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchFileFormat Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchHostController Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchLanguageResourcePhrase Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchLinguisticComponentsStatus Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchLinksDatabase Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchMetadataCategory Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchMetadataCrawledProperty Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchMetadataManagedProperty Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchMetadataMapping Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchOwner Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchPropertyRule Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchPropertyRuleCollection Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQueryAndSiteSettingsService Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQueryAndSiteSettingsServi... Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQueryAndSiteSettingsServi... Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQueryAuthority Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQueryDemoted Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQueryKeyword Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQueryScope Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQueryScopeRule Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQuerySpellingCorrection Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchQuerySuggestionCandidates Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchRankingModel Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchResultItemType Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchResultSource Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchSecurityTrimmer Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchService Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchServiceApplication Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchServiceApplicationBackupS... Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchServiceApplicationProxy Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchServiceInstance Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchSiteHitRule Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchStatus Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchTopology Microsoft.SharePoint.PowerShell
Get-SPEnterpriseSearchVssDataPath Microsoft.SharePoint.PowerShell
Get-SPExcelBIServer Microsoft.SharePoint.PowerShell
Get-SPExcelBlockedFileType Microsoft.SharePoint.PowerShell
Get-SPExcelDataConnectionLibrary Microsoft.SharePoint.PowerShell
Get-SPExcelDataProvider Microsoft.SharePoint.PowerShell
Get-SPExcelFileLocation Microsoft.SharePoint.PowerShell
Get-SPExcelServiceApplication Microsoft.SharePoint.PowerShell
Get-SPExcelUserDefinedFunction Microsoft.SharePoint.PowerShell
Get-SPFarm Microsoft.SharePoint.PowerShell
Get-SPFarmConfig Microsoft.SharePoint.PowerShell
Get-SPFeature Microsoft.SharePoint.PowerShell
Get-SPHealthAnalysisRule Microsoft.SharePoint.PowerShell
Get-SPHelpCollection Microsoft.SharePoint.PowerShell
Get-SPInfoPathFormsService Microsoft.SharePoint.PowerShell
Get-SPInfoPathFormTemplate Microsoft.SharePoint.PowerShell
Get-SPInfoPathUserAgent Microsoft.SharePoint.PowerShell
Get-SPInfoPathWebServiceProxy Microsoft.SharePoint.PowerShell
Get-SPInternalAppStateSyncLastRunTime Microsoft.SharePoint.PowerShell
Get-SPInternalAppStateUpdateInterval Microsoft.SharePoint.PowerShell
Get-SPIRMSettings Microsoft.SharePoint.PowerShell
Get-SPLogEvent Microsoft.SharePoint.PowerShell
Get-SPLogLevel Microsoft.SharePoint.PowerShell
Get-SPManagedAccount Microsoft.SharePoint.PowerShell
Get-SPManagedPath Microsoft.SharePoint.PowerShell
Get-SPMetadataServiceApplication Microsoft.SharePoint.PowerShell
Get-SPMetadataServiceApplicationProxy Microsoft.SharePoint.PowerShell
Get-SPMobileMessagingAccount Microsoft.SharePoint.PowerShell
Get-SPODataConnectionSetting Microsoft.SharePoint.PowerShell
Get-SPODataConnectionSettingMetadata Microsoft.SharePoint.PowerShell
Get-SPOfficeStoreAppsDefaultActivation Microsoft.SharePoint.PowerShell
Get-SPPendingUpgradeActions Microsoft.SharePoint.PowerShell
Get-SPPerformancePointServiceApplication Microsoft.SharePoint.PowerShell
Get-SPPerformancePointServiceApplicationTrusted... Microsoft.SharePoint.PowerShell
Get-SPPluggableSecurityTrimmer Microsoft.SharePoint.PowerShell
Get-SPProcessAccount Microsoft.SharePoint.PowerShell
Get-SPProduct Microsoft.SharePoint.PowerShell
Get-SPProfileLeader Microsoft.SharePoint.PowerShell
Get-SPProfileServiceApplicationSecurity Microsoft.SharePoint.PowerShell
Get-SPProjectDatabaseQuota Microsoft.SharePoint.PowerShell
Get-SPProjectDatabaseState Microsoft.SharePoint.PowerShell
Get-SPProjectEnterpriseProjectTaskSync Microsoft.SharePoint.PowerShell
Get-SPProjectLogLevelManager Microsoft.SharePoint.PowerShell
Get-SPProjectOdataConfiguration Microsoft.SharePoint.PowerShell
Get-SPProjectPCSSettings Microsoft.SharePoint.PowerShell
Get-SPProjectPermissionMode Microsoft.SharePoint.PowerShell
Get-SPProjectQueueSettings Microsoft.SharePoint.PowerShell
Get-SPProjectWebInstance Microsoft.SharePoint.PowerShell
Get-SPRequestManagementSettings Microsoft.SharePoint.PowerShell
Get-SPRoutingMachineInfo Microsoft.SharePoint.PowerShell
Get-SPRoutingMachinePool Microsoft.SharePoint.PowerShell
Get-SPRoutingRule Microsoft.SharePoint.PowerShell
Get-SPRSDatabase Microsoft.SharePoint.PowerShell
Get-SPRSDatabaseCreationScript Microsoft.SharePoint.PowerShell
Get-SPRSDatabaseRightsScript Microsoft.SharePoint.PowerShell
Get-SPRSDatabaseUpgradeScript Microsoft.SharePoint.PowerShell
Get-SPRSExtension Microsoft.SharePoint.PowerShell
Get-SPRSProxyUrl Microsoft.SharePoint.PowerShell
Get-SPRSServiceApplication Microsoft.SharePoint.PowerShell
Get-SPRSServiceApplicationProxy Microsoft.SharePoint.PowerShell
Get-SPRSServiceApplicationServers Microsoft.SharePoint.PowerShell
Get-SPRSSite Microsoft.SharePoint.PowerShell
Get-SPScaleOutDatabase Microsoft.SharePoint.PowerShell
Get-SPScaleOutDatabaseDataState Microsoft.SharePoint.PowerShell
Get-SPScaleOutDatabaseInconsistency Microsoft.SharePoint.PowerShell
Get-SPScaleOutDatabaseLogEntry Microsoft.SharePoint.PowerShell
Get-SPSecureStoreApplication Microsoft.SharePoint.PowerShell
Get-SPSecureStoreSystemAccount Microsoft.SharePoint.PowerShell
Get-SPSecurityTokenServiceConfig Microsoft.SharePoint.PowerShell
Get-SPServer Microsoft.SharePoint.PowerShell
Get-SPServerScaleOutDatabase Microsoft.SharePoint.PowerShell
Get-SPServerScaleOutDatabaseDataState Microsoft.SharePoint.PowerShell
Get-SPServerScaleOutDatabaseInconsistency Microsoft.SharePoint.PowerShell
Get-SPServerScaleOutDatabaseLogEntry Microsoft.SharePoint.PowerShell
Get-SPServiceApplication Microsoft.SharePoint.PowerShell
Get-SPServiceApplicationEndpoint Microsoft.SharePoint.PowerShell
Get-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
Get-SPServiceApplicationProxy Microsoft.SharePoint.PowerShell
Get-SPServiceApplicationProxyGroup Microsoft.SharePoint.PowerShell
Get-SPServiceApplicationSecurity Microsoft.SharePoint.PowerShell
Get-SPServiceContext Microsoft.SharePoint.PowerShell
Get-SPServiceHostConfig Microsoft.SharePoint.PowerShell
Get-SPServiceInstance Microsoft.SharePoint.PowerShell
Get-SPSessionStateService Microsoft.SharePoint.PowerShell
Get-SPShellAdmin Microsoft.SharePoint.PowerShell
Get-SPSite Microsoft.SharePoint.PowerShell
Get-SPSiteAdministration Microsoft.SharePoint.PowerShell
Get-SPSiteSubscription Microsoft.SharePoint.PowerShell
Get-SPSiteSubscriptionConfig Microsoft.SharePoint.PowerShell
Get-SPSiteSubscriptionEdiscoveryHub Microsoft.SharePoint.PowerShell
Get-SPSiteSubscriptionEdiscoverySearchScope Microsoft.SharePoint.PowerShell
Get-SPSiteSubscriptionFeaturePack Microsoft.SharePoint.PowerShell
Get-SPSiteSubscriptionIRMConfig Microsoft.SharePoint.PowerShell
Get-SPSiteSubscriptionMetadataConfig Microsoft.SharePoint.PowerShell
Get-SPSiteUpgradeSessionInfo Microsoft.SharePoint.PowerShell
Get-SPSiteURL Microsoft.SharePoint.PowerShell
Get-SPSolution Microsoft.SharePoint.PowerShell
Get-SPStateServiceApplication Microsoft.SharePoint.PowerShell
Get-SPStateServiceApplicationProxy Microsoft.SharePoint.PowerShell
Get-SPStateServiceDatabase Microsoft.SharePoint.PowerShell
Get-SPTaxonomySession Microsoft.SharePoint.PowerShell
Get-SPThrottlingRule Microsoft.SharePoint.PowerShell
Get-SPTimerJob Microsoft.SharePoint.PowerShell
Get-SPTopologyServiceApplication Microsoft.SharePoint.PowerShell
Get-SPTopologyServiceApplicationProxy Microsoft.SharePoint.PowerShell
Get-SPTranslationThrottlingSetting Microsoft.SharePoint.PowerShell
Get-SPTrustedIdentityTokenIssuer Microsoft.SharePoint.PowerShell
Get-SPTrustedRootAuthority Microsoft.SharePoint.PowerShell
Get-SPTrustedSecurityTokenIssuer Microsoft.SharePoint.PowerShell
Get-SPTrustedServiceTokenIssuer Microsoft.SharePoint.PowerShell
Get-SPUpgradeActions Microsoft.SharePoint.PowerShell
Get-SPUsageApplication Microsoft.SharePoint.PowerShell
Get-SPUsageDefinition Microsoft.SharePoint.PowerShell
Get-SPUsageService Microsoft.SharePoint.PowerShell
Get-SPUser Microsoft.SharePoint.PowerShell
Get-SPUserLicense Microsoft.SharePoint.PowerShell
Get-SPUserLicenseMapping Microsoft.SharePoint.PowerShell
Get-SPUserLicensing Microsoft.SharePoint.PowerShell
Get-SPUserSettingsProvider Microsoft.SharePoint.PowerShell
Get-SPUserSettingsProviderManager Microsoft.SharePoint.PowerShell
Get-SPUserSolution Microsoft.SharePoint.PowerShell
Get-SPVisioExternalData Microsoft.SharePoint.PowerShell
Get-SPVisioPerformance Microsoft.SharePoint.PowerShell
Get-SPVisioSafeDataProvider Microsoft.SharePoint.PowerShell
Get-SPVisioServiceApplication Microsoft.SharePoint.PowerShell
Get-SPVisioServiceApplicationProxy Microsoft.SharePoint.PowerShell
Get-SPWeb Microsoft.SharePoint.PowerShell
Get-SPWebApplication Microsoft.SharePoint.PowerShell
Get-SPWebApplicationAppDomain Microsoft.SharePoint.PowerShell
Get-SPWebApplicationHttpThrottlingMonitor Microsoft.SharePoint.PowerShell
Get-SPWebPartPack Microsoft.SharePoint.PowerShell
Get-SPWebTemplate Microsoft.SharePoint.PowerShell
Get-SPWOPIBinding Microsoft.SharePoint.PowerShell
Get-SPWOPISuppressionSetting Microsoft.SharePoint.PowerShell
Get-SPWOPIZone Microsoft.SharePoint.PowerShell
Get-SPWorkflowConfig Microsoft.SharePoint.PowerShell
Get-SPWorkflowServiceApplicationProxy Microsoft.SharePoint.PowerShell
Get-Tpm TrustedPlatformModule
Get-TpmEndorsementKeyInfo TrustedPlatformModule
Get-TpmSupportedFeature TrustedPlatformModule
Get-TraceSource Microsoft.PowerShell.Utility
Get-Transaction Microsoft.PowerShell.Management
Get-TroubleshootingPack TroubleshootingPack
Get-TypeData Microsoft.PowerShell.Utility
Get-UICulture Microsoft.PowerShell.Utility
Get-Unique Microsoft.PowerShell.Utility
Get-Variable Microsoft.PowerShell.Utility
Get-WebAppDomain WebAdministration
Get-WebApplication WebAdministration
Get-WebApplicationMonitoringStatus Microsoft.MonitoringAgent.Pow...
Get-WebAppPoolState WebAdministration
Get-WebBinding WebAdministration
Get-WebCentralCertProvider WebAdministration
Get-WebConfigFile WebAdministration
Get-WebConfiguration WebAdministration
Get-WebConfigurationBackup WebAdministration
Get-WebConfigurationLocation WebAdministration
Get-WebConfigurationLock WebAdministration
Get-WebConfigurationProperty WebAdministration
Get-WebFilePath WebAdministration
Get-WebGlobalModule WebAdministration
Get-WebHandler WebAdministration
Get-WebItemState WebAdministration
Get-WebManagedModule WebAdministration
Get-WebRequest WebAdministration
Get-Website WebAdministration
Get-WebsiteState WebAdministration
Get-WebURL WebAdministration
Get-WebVirtualDirectory WebAdministration
Get-WheaMemoryPolicy Whea
Get-WIMBootEntry Dism
Get-WinAcceptLanguageFromLanguageListOptOut International
Get-WinCultureFromLanguageListOptOut International
Get-WinDefaultInputMethodOverride International
Get-WindowsDriver Dism
Get-WindowsEdition Dism
Get-WindowsErrorReporting WindowsErrorReporting
Get-WindowsImage Dism
Get-WindowsImageContent Dism
Get-WindowsOptionalFeature Dism
Get-WindowsPackage Dism
Get-WindowsSearchSetting WindowsSearch
Get-WinEvent Microsoft.PowerShell.Diagnostics
Get-WinHomeLocation International
Get-WinLanguageBarOption International
Get-WinSystemLocale International
Get-WinUILanguageOverride International
Get-WinUserLanguageList International
Get-WmiObject Microsoft.PowerShell.Management
Get-WSManCredSSP Microsoft.WSMan.Management
Get-WSManInstance Microsoft.WSMan.Management

Advertisements
Advertisements

Configure diagnostic logging SharePoint 2016

The SharePoint Server 2016 environment might require configuration of the diagnostic logging settings after initial deployment, after upgrade, and if a change is made to the environment, such as adding or removing a server.

The guidelines in the following list can help you form best practices for the specific environment.

* Change the drive to which the server writes logs:

By default, SharePoint Server 2016 writes diagnostic logs to the same drive and partition on which it was installed. Because diagnostic logging can use a large amount of drive space and compromise drive performance, you should configure SharePoint Server 2016 to write to another drive on which SharePoint Server 2016 is not installed.

You should also consider the connection speed to the drive on which SharePoint Server 2016 writes the logs. If verbose-level logging is configured, the server records a large amount of data. Therefore, a slow connection might result in poor log performance.

* Restrict log disk space usage:

By default, the amount of disk space that diagnostic logging can use is unlimited. Therefore, restrict the disk space that logging uses, especially if you configure logging to write verbose-level events. When the disk reaches the restriction, SharePoint Server 2016 removes the oldest logs before it records new logging data.

* Use the Verbose setting sparingly:

You can configure diagnostic logging to record verbose-level events. This means that SharePoint Server 2016 records every action that it takes. Verbose-level logging can quickly use drive space and affect drive and server performance. You can use verbose-level logging to record more detail when you are making critical changes and then reconfigure logging to record only higher-level events after you make the change.

* Regularly back up logs:

Diagnostic logs contain important data. Therefore, back up the logs regularly to ensure that this data is preserved. When you restrict log drive space usage, or if you keep logs for only a few days, SharePoint Server 2016 automatically deletes log files, starting with the oldest files first, when the threshold is met.

* Enable event log flooding protection:

When you enable this setting, SharePoint Server 2016 detects repeating events in the Windows event log, and suppresses them until conditions return to a typical state.

You can set the level of diagnostic logging for the event log and for the trace log. This limits the types and amount of information that are written to each log.

The following tables define the levels of logging that are available for the event log and trace log.

event-log-levels

trace-log-levels

Configure diagnostic logging by using Central Administration :

  1. In Central Administration, on the home page, click Monitoring.
  2. On the Monitoring page, in the Reporting section, click Configure diagnostic logging.
  3. On the Diagnostic Logging page, in the Event Throttling section, configure event throttling as follows:To configure event throttling for all categories:
    1. Select the All Categories check box.
    2. Select the event log level from the Least critical event to report to the event log list.
    3. Select the trace log level from the Least critical event to report to the trace log list.

    To configure event throttling for one or more categories:

    1. Select the check boxes of the categories that you want.
    2. Select the event log level from the Least critical event to report to the event log list.
    3. Select the trace log level from the Least critical event to report to the trace log list.

    To configure event throttling for one or more subcategories (you can expand one or more categories and select any subcategory):

    1. Click the plus (+) next to the category to expand the category.
    2. Select the check box of the subcategory.
    3. Select the event log level from the Least critical event to report to the event log list.
    4. Select the trace log level from the Least critical event to report to the trace log list.

    To return event throttling for all categories to default settings:

    1. Select the All Categories check box.
    2. Select Reset to default from the Least critical event to report to the event log list.
    3. Select Reset to default from the Least critical event to report to the trace log list.
  4. In the Event Log Flood Protection section, select the Enable Event Log Flood Protection check box.
  5. In the Trace Log section, in the Path box, type the path of the folder to which you want logs to be written.
  6. In the Number of days to store log files box, type the number of days (1-366) that you want logs to be kept. After this time, logs will automatically be deleted.
  7. To restrict the disk space that logs can use, select the Restrict Trace Log disk space usage check box, and then type the number gigabytes (GB) you want to restrict log files to. When logs reach this value, older logs will automatically be deleted.
  8. After you have made the changes that you want on the Diagnostic Logging page, click OK.

Configure diagnostic logging by using Windows PowerShell :

  1. Verify that you have the following memberships:
  • securityadmin fixed server role on the SQL Server instance.
  • db_owner fixed database role on all databases that are to be updated.
  • Administrators group on the server on which you are running the Windows PowerShell cmdlets.

An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server 2016 cmdlets.

  1. On the Start menu, click All Programs.
  2. Click SharePoint 2016.
  3. Click SharePoint 2016 Management Shell.
  4. To change the drive to which the server writes logs, at the Windows PowerShell command prompt, type the following command:

Set-SPDiagnosticConfig -LogLocation D:\DiagnosticLogs

  1. To restrict log disk space usage, at the Windows PowerShell command prompt, type the following command:

Set-SPDiagnosticConfig -LogMaxDiskSpaceUsageEnabled

Or assign the maximum disk space for logs:

Set-SPDiagnosticConfig -LogDiskSpaceUsageGB 500

  1. To view the current logging level, at the Windows PowerShell command prompt, type the following command:

Get-SPLogLevel

  1. To change the logging level, at the Windows PowerShell command prompt, type the following command:

Set-SPLogLevel -TraceSeverity Monitorable

To set all categories back to default levels, at the Windows PowerShell command prompt, type the following command, and then press ENTER:

Clear-SPLogLevel

9. To enable event log flooding protection, at the Windows PowerShell command prompt, type the following command:

Set-SPDiagnosticConfig -EventLogFloodProtectionEnabled