PS – Run as another user

You should be passing the password to the Start-Process cmdlet in a more secure way, it can be stored in a file as an encrypted string. The account that encrypts the string is the only one that can decrypt it so bear that in mind. $secpasswd = ConvertTo-SecureString “password” -AsPlainText -Force $mycreds = New-Object System.Management.Automation.PSCredential(“DOMAIN\user”,…

Configure Bitlocker during deployment

Set X256 AES Encryption Cipher reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FVE” -t REG_DWORD -v EncryptionMethodWithXtsFdv -d 7 -f Set Full Disk Encryption reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FVE” -t REG_DWORD -v OSEncryptionType -d 1 -f Set Bitlocker PIN manage-bde -add C: -TPMAndPIN 123456 Enable Bitlocker manage-bde -on C: -rp

Resetting Unifi Controller Password

If you’re like me and you’ve forgotton your Unifi Controller password, fear not! Follow the below steps to get back in. I should say before I start this is for a system running Ubuntu Server 16.04. Install whois sudo apt install whois Generate your new password printf “MyNewPassword123?!” | mkpasswd –stdin –method=sha-512 #Returns the below…

WSUS Sync Soap Error

Possible Cause This issue occurs if the WSUS servers are configured to use the old synchronization endpoint, This endpoint was fully decommissioned and is no longer reachable after July 8, 2019. Resolution To fix the issue, change the synchronization endpoint in WSUS configuration to To do this, follow these steps on the topmost WSUS server that connects…

Basic Unattend for SCCM

The below xml is a very basic unattend file for SCCM OS deployments. It solves the issue where ‘Just a moment…’ covers the deployment status window so you can’t see the progress of the deployment. <?xml version=”1.0″ encoding=”utf-8″?> <unattend xmlns=”urn:schemas-microsoft-com:unattend”> <settings pass=”oobeSystem”> <component name=”Microsoft-Windows-Shell-Setup” processorArchitecture=”amd64″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=””> <OOBE> <HideEULAPage>true</HideEULAPage> <ProtectYourPC>1</ProtectYourPC> <HideLocalAccountScreen>true</HideLocalAccountScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>…

Fix WMI Service Not Starting/SCCM Client failing to install due to WMI errors

I used this fix when the SCCM client wouldn’t install on a Windows 7 client, it was failing to start the Windows Magagement Instrumentation service. 1. Log onto Windows 7 with an administrator account, click Start, type services.msc in the Start Search box and press Enter. 2. In the right pane of the Service console, locate and right-click Windows Management Instrumentation,…

Powershell behind a proxy

Open powershell as admin notepad $PROFILE copy in: $browser = New-Object System.Net.WebClient $browser.Proxy.Credentials =[System.Net.CredentialCache]::DefaultNetworkCredentials Save, close and restart powershell

Speed up TFTP on SCCM DP

Location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\DP Name: RamDiskTFTPWindowSize Type: REG_DWORD The default value is 1 (1 data block fills the window) I used 8 which gave good speeds. We can also tweak the TFTPBlockSize which has been around for many versions of Configuration Manager. Location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\DP Name: RamDiskTFTPBlockSize Type: REG_DWORD Value: <customized block size> Test with values: 4096, 8192,…

Removing AWS Credentials from VMM

Start > Run: %localappdata%\AWSToolkit Delete the file named: RegisteredAccounts.json

Powershell Pop Up File Selector

Function Get-FileName($initialDirectory) { [System.Reflection.Assembly]::LoadWithPartialName(“”) | Out-Null $OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog $OpenFileDialog.initialDirectory = $initialDirectory $OpenFileDialog.filter = “All files (*.*)| *.*” $OpenFileDialog.ShowDialog() | Out-Null $OpenFileDialog.filename } #end function Get-FileName # *** Entry Point to Script *** $thefile = Get-FileName -initialDirectory “c:fso” Write-host $thefile