PowerShell – reinstall Windows 10 Store app

#Reinstall-StoreApp.ps1 #Requires -RunAsAdministrator $Store=Get-Appxpackage -Allusers | Where-Object {$_.PackageFullName -match ‘WindowsStore’} | Sort-Object -Property Version -Descending | Select-Object -First 1 $PackageName=$Store.PackageFullName $StoreManifest = “C:\Program Files\WindowsApps\$PackageName\AppxManifest.xml” if (Test-Path -Path $StoreManifest) { Add-AppxPackage -register $StoreManifest -DisableDevelopmentMode }

0

PowerShell – Analogue Clock

# analogue-clock.ps1 # Set-StrictMode -Version latest Add-Type -AssemblyName System.Drawing Add-Type -AssemblyName System.Windows.Forms $DegreesToRadians = [Math]::PI/180 $PSicon = [Drawing.Icon]::ExtractAssociatedIcon((Get-Command -Name powershell).Path) ################################# function Initialize-Clock() { # create the form to display the clock $script:form = New-Object  -TypeName Windows.Forms.Form $script:form.Icon = $PSicon $script:form.Text = ‘Analogue Clock’ $script:form.Height = 700 $script:form.Width = $form.Height $script:form.BackColor=[Drawing.Color]::White $script:form.Location.X = 1000 $script:form.TransparencyKey…

2

Windows – Get-WindowsUpdateLog

# Get-WindowsUpdateLog.ps1# walk the WindowsUpdate.log to list the # Security Updates that have been installed. # [anything][PatchDate][anything][matchtext][PatchText]$PATTERN  = “([^\n]+\}\t)”$PATTERN += “(?<PatchDate>[0-9]{4}-[0-9]{2}-[0-9]{2})”$PATTERN += “([^\n]+Windows successfully installed the following update:\s)”$PATTERN += “(?<PatchText>[^\n]+)” Function Get-WindowsUpdates($Server) { $WindowsUpdateLogPath = “\\” + $Server + “\Admin$\WindowsUpdate.log” $WindowsUpdateLog = Get-Content $WindowsUpdateLogPath $result = @() ForEach ($line in $WindowsUpdateLog) {   if ($line.Contains(“Windows successfully installed the following update:”))…

0

SharePoint delays – CRL?

if your Sharepoint systems are hidden away, they may experience slowdowns due to CRL lookup. The problem is that when loading signed assemblies the .net Framework checks the Internet based Certificate Revocation List. As your servers have, like most secure environments, no outgoing connections to the public Internet, the connection to crl.microsoft.com times out. This takes far…

1