Skip to content

Instantly share code, notes, and snippets.

View jchable's full-sized avatar
😎

Julien CHABLE jchable

😎
View GitHub Profile
@jchable
jchable / search_for_infopath_form_personalization.ps1
Created April 24, 2025 12:48
Search for InfoPath form customization in SharePoint list
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
$WebAppURL="<webapp URL>"
$ReportOutput="<path to output CSV file>"
$ResultColl = @()
$WebsColl = Get-SPWebApplication $WebAppURL | Get-SPSite -Limit All | Get-SPWeb -Limit All
Foreach($Web in $WebsColl)
{
$web = get-spweb "<web site URL>"
function removeCustomInfopathListForms([String]$folderName, [Microsoft.SharePoint.SPContentType]$ct)
{
write-host Removing custom Infopath list form on $folderName
# Remove InfoPath customisatin
$ct.ResourceFolder.Properties["_ipfs_infopathenabled"] = "False"
# Reset default form URL
$ct.NewFormUrl = ""
@jchable
jchable / gist:0e4b6c30a3082ddf153d535ea7b7cfcf
Last active April 24, 2025 07:43
Aspose.Words font installation in an ASP.NET Core Docker image
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
#install fonts
ENV DEBIAN_FRONTEND=noninteractive
RUN echo "deb http://deb.debian.org/debian/ bookworm main contrib" > /etc/apt/sources.list && \
echo "deb-src http://deb.debian.org/debian/ bookworm main contrib" >> /etc/apt/sources.list && \
echo "deb http://security.debian.org/ bookworm-security main contrib" >> /etc/apt/sources.list && \
echo "deb-src http://security.debian.org/ bookworm-security main contrib" >> /etc/apt/sources.list
RUN sed -i'.bak' 's/$/ contrib/' /etc/apt/sources.list
RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections
RUN apt-get update; apt-get install --no-install-recommends -y ttf-mscorefonts-installer fontconfig
@jchable
jchable / gist:92649652e9e4fbb297755d7fc502a745
Created September 23, 2024 13:24
Save all Microsoft SQL databases with PowerShell
$serverName = "localhost"
$backupDirectory = "<your backup directory>"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") | Out-Null
$server = New-Object ("Microsoft.SqlServer.Management.Smo.Server") $serverName
@jchable
jchable / install_vs20217_community_offline
Created April 10, 2017 00:19
Install ASP.NET et .NET Visual Studio 2017 for NC IT developer
.\vs_community__1132454428.1487802560.exe --layout D:\ISO\Microsoft\VisualStudio\2017\offline --lang en-US --add Microsoft.VisualStudio.Component.Web Microsoft.VisualStudio.Component.WebDeploy Microsoft.Net.Component.4.5.2.TargetingPack Microsoft.Net.Component.4.5.2.TargetingPack Microsoft.VisualStudio.Component.CoreEditor Microsoft.VisualStudio.Component.NuGet Microsoft.VisualStudio.Component.WebDeploy