This file contains 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
/** | |
* Replace all speech marks with blanks in the active sheet of Excel Online. | |
*/ | |
function main(workbook: ExcelScript.Workbook) { | |
// Get the currently active worksheet in the workbook | |
let activeSheet = workbook.getActiveWorksheet(); | |
// Get the used range of the active sheet | |
let usedRange = activeSheet.getUsedRange(); |
This file contains 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
/** | |
* Adds CSV data to a specified worksheet in the workbook. | |
* | |
* @param {ExcelScript.Workbook} workbook - The target workbook. | |
* @param {string} csv - The CSV data as a string. | |
*/ | |
function main(workbook: ExcelScript.Workbook, csv: string): void { | |
// Access the target worksheet. | |
let targetSheet = workbook.getWorksheet("Sheet1"); |
This file contains 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
Connect-PnPOnline -Url *sharepointadminurl* -Interactive | |
$Sites = Get-PnPTenantSite | |
for($x = 0; $x -lt $Sites.Count; $x++) { | |
Set-PnPTenantSite -Url $Sites[$x].Url -Owners "*adminemailaddress*" | |
Write-Host "Updating $($Sites[$x].Title), Site $($x)" | |
} |
This file contains 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
# Parameters for source and destination for the Image file | |
# Current script is edited to put the same image on LockScreen and Wallpaper | |
$WallpaperURL = "bloburl from azure" # Change to your fitting | |
$LockscreenUrl = "bloburl from azure" # Change to your fitting | |
$ImageDestinationFolder = "c:\temp" # Change to your fitting - this is the folder for the wallpaper image | |
$WallpaperDestinationFile = "$ImageDestinationFolder\wallpaper.png" # Change to your fitting - this is the Wallpaper image | |
$LockScreenDestinationFile = "$ImageDestinationFolder\LockScreen.png" # Change to your fitting - this is the Lockscreen image |
This file contains 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
$members = net localgroup administrators | | |
where {$_ -AND $_ -notmatch "command completed successfully"} | | |
select -skip 4 | |
$members += $(Get-Date -format 'd') | |
write-host $members | |
#Only keep this line if you are using Datto RMM for a UDF. | |
#New-ItemProperty -PropertyType String "HKLM:\SOFTWARE\CentraStage" -Name "Custom5" -Value $members |
This file contains 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
$Files = Get-ChildItem -Path "your\directory\here" -File -Recurse -Name -Force -ErrorAction SilentlyContinue | Measure-Object | Select-Object @{Name='File(s) Count';Expression={$_.count}} | |
$Folders = Get-ChildItem -Path "your\directory\here" -Directory -Recurse -Name -Force -ErrorAction SilentlyContinue | Measure-Object | Select-Object @{Name='Folder Count';Expression={$_.count}} | |
write-host "Files: $Files" | |
write-host "Folders: $Folders" |
This file contains 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
$TPMPRESENT = (Get-Tpm).TpmPresent | |
$TPMENABLED = (Get-Tpm).TpmEnabled | |
$TPMREADY = (Get-Tpm).TpmReady | |
$tpmVersion = Get-WmiObject -Class Win32_Tpm -Namespace root\CIMV2\Security\MicrosoftTpm | Select-Object -Property SpecVersion | |
$tpmVersionOut = $tpmVersion.SpecVersion.Split(",")[0] -as [string] | |
Write-Host "TPM Present: ${TPMPRESENT}, TPM Enabled: ${TPMENABLED}, TPM Ready ${TPMREADY}, TPM Version: ${tpmVersionOut}" |
This file contains 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
New-ItemProperty "HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319" -Name "SystemDefaultTlsVersions" -Value 1 -PropertyType "DWord" | |
New-ItemProperty "HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319" -Name "SystemDefaultTlsVersions" -Value 1 -PropertyType "DWord" | |
New-ItemProperty "HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319" -Name "SystemDefaultTlsVersions" -Value 1 -PropertyType "DWord" | |
New-ItemProperty "HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319" -Name "SystemDefaultTlsVersions" -Value 1 -PropertyType "DWord" |
NewerOlder