This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Utf8NoBomEncoding = [System.Text.UTF8Encoding]::new($false); | |
Get-ChildItem -Path "." -Recurse -File | | |
Where-Object { $_.FullName -inotmatch "\\bin\\|\\obj\\"} | | |
ForEach-Object { | |
Write-Output $_.FullName; | |
$content = [IO.File]::ReadAllLines($_.FullName); | |
[IO.File]::WriteAllLines($_.FullName, $content, $Utf8NoBomEncoding); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -RunAsAdministrator | |
Clear-Host | |
$deleteDate = (Get-Date).AddMonths(-2) | |
$counter = 0 | |
# https://port135.com/remove-older-files-machinekeys/ | |
# Back up the three files below. These files are used by IIS. It’s important to back them up before removing any files from MachinkeKeys folder. | |
# | |
# 6de9cb26d2b98c01ec4e9e8b34824aa2_GUID iisConfigurationKey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@REM Just save this file in the same directory as the p4vinst64.msi file and run it as administrator, or just copy the msiexec line minus the %~dp0 | |
@%~d0 | |
@cd "%~dp0" | |
@echo INSTALLING: %~dp0p4vinst64.msi | |
@rem install p4 with minimal ui | |
msiexec.exe /i "%~dp0p4vinst64.msi" /qb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# download and install Solarwinds SentryOne Plan Explorer #> | |
$filenamePlanExplorerInstall = "$env:USERPROFILE\downloads\" + ([string](Get-Date -format "yyyy-MM-dd")) + "_SolarWinds-PlanExplorer.exe" | |
Start-BitsTransfer -Source 'https://downloads.solarwinds.com/solarwinds/Release/FreeTool/SolarWinds-PlanExplorer.exe' -Destination $filenamePlanExplorerInstall | |
& $filenamePlanExplorerInstall /install /passive /norestart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
$module = Get-Module tcdbtools | |
if (!$module) { | |
Install-Module tcdbtools -Force | |
} | |
Import-Module tcdbtools | |
$module = Get-Module SqlServer | |
if (!$module) { | |
Install-Module SqlServer -Force | |
#get-command -Module sqlserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-WmiObject Win32_Process -Filter "name = 'w3wp.exe'" | | |
Where-Object {$_.CommandLine -imatch "appPoolName"} | | |
Select-Object ProcessId, Name, CommandLine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup> | |
<!--ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally--> | |
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <!-- True for new projects, false for existing ones with lots of warnings --> | |
<TargetFramework>net8.0</TargetFramework> | |
<Nullable>enable</Nullable> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<PublishReadyToRun>true</PublishReadyToRun> | |
<SelfContained>true</SelfContained> | |
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
<# | |
PURPOSE: To scan all of the projects in a directory and compare the PackageReferences to the | |
Directory.Packages.props PackageVersions. Outputs if any are missing from the Directory.Packages.props | |
#> | |
$solutionFolder = "C:\..solution path..\" | |
$files = (Get-ChildItem $solutionFolder -Recurse -Filter "*.csproj").FullName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
<########################################################################### | |
Author: Tim Cartwright | |
Purpose to turn off client ip masking for all application insights resources if masking is enabled | |
DisableIPMasking: | |
- true: disable masking client ips with 0.0.0.0 and show the real client ip | |
- false: masks all client ips with 0.0.0.0 |