Windows Terminal

To install Windows terminal without going through the Store

Download the software with this command in powershell:

Invoke-WebRequest -Uri https://github.com/microsoft/terminal/releases/download/v1.7.1091.0/Microsoft.WindowsTerminal_1.7.1091.0_8wekyb3d8bbwe.msixbundle -outfile Microsoft.WindowsTerminal_1.7.1091.0_8wekyb3d8bbwe.msixbundle

Install the package with this

Add-AppxPackage -Path .\Microsoft.WindowsTerminal_1.7.1091.0_8wekyb3d8bbwe.msixbundle

Works fine on Windows Server 2022 ! (Will not autoupdate i think….. who knows…)

PcEngine – APU – Firmware flash

Justa reminder and links how to flash the Firmware of APUs from https://www.pcengines.ch/

* Enter Console of pfsense.
* Install flashrom packet -> pkg install -y flashrom
* Collect new Firmware from Pcengines site -> https://pcengines.github.io/ with
the command fetch.
Fetch -1 https://3mdeb.com/open-source-firmware/pcengines/apu1/apu1_v4.15.0.3.rom
* Flash the Rom image
APU1:
flashrom -w apu1_v4.8.0.3.rom -c ”MX25L1605A/MX25L1606E/MX25L1608
Add -p internal:boardmismatch=force to force the board if its unrecognized.

APU2 and above:
flashrom -w coreboot.rom -p internal

Test the bios version with this command:
dmidecode -s bios-version



Move Data/logfiles of a Live SQL Server to new location

Sometimes its needed to be able to move a log file etc on a live and running instance.
To do so use the Managementstudio to run some SQL scripts.

ALTER DATABASE "AI2018_Inventor IDF"  
MODIFY FILE (NAME ="AI2016_Inventor IDF_log", FILENAME = 'E:\DatabaseLogfiles\AI2018_Inventor IDF_log.ldf');

-- Set database to online too try again of you forgott to move the file ;)
-- User the full samt of the service account nt Service\MSSSQL$instance... for folder rights...
ALTER DATABASE Vault IDF SET ONLINE;


-- Verify file location and status!
SELECT name, physical_name AS NewLocation, state_desc AS OnlineStatus
FROM sys.master_files  
WHERE database_id = DB_ID(N'Vault')  
GO

Userrights might be a issue and just to remember:
When using the default service account and you need to give it new folder rights the syntax for adding the account is ”NT Service\Accountname”

Windows Subsystem for Linux – WSL

Quick and dirty way to install WSL in Windows 10 2004->

Enable ”Windows Subsystem for Linux”
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Reboot!!!

Set WSL version to use
wsl –set-default-version 2

Update the linux cernel…
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

Ubuntu 20.04 LTS
https://www.microsoft.com/store/apps/9n6svws3rx71

start https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel

VSS – Volume Shadow Copy… the Old friend ?!

Vss

On every windows machine there seems to be people ignoring the fact that all application critical backups often use this old Gem from Microsoft.

This like this pop upp all the time ” We dont care about it we use Weeam for backups…” :-/
(For you who didnt get it… Weeam and almost every other Windows backup software uses the WSS all the time internally to make application aware backups… (and that wahts you want)

Wss can and is so very oftern the caus of the backup failure that happends.
Here i collect som good commands that i use to troubleshoot the WSS. Enjoy!

To find all writers in the system AND GET ITS STATUS!
vssadmin list writers

To get all present ”shadows”
vssadmin list shadows

To list all shadowstorage present and how they might be limited
vssadmin list shadowstorage

To Delete all present Shadows
vssadmin delete shadows /for=c: /all

Remove all shadows on ALL volumes..
vssadmin delete shadows /all

To manually create a new shadow
vssadmin create shadow /for=C:

To delete the backup catalog
wbadmin delete catalog

Add azuread user as local admin

When setting up a local machine using cloudaccount like azure and the machine gets a new user they are not often made local administrators of the machine.

To fix this the following needs to be done.

#1 Gain local admin rights (somehow…)
#2 Determin the account name with the command ”whoami”
#3 with localadmin right from console run the following command

English:
Net localgroup Administrators /add ”AzureAD\<users office 365 email address>”
Swedish:
Net localgroup Administratörer /add ”AzureAD\<users office 365 email address>”



Office URI scheme – ms-excel:ofe|u|https://

Detaljerad info :
https://docs.microsoft.com/en-us/office/client-developer/office-uri-schemes

Excel:
Öppna online:
https://sharepoint.com/shared document/excel.xlsx?Web=1
Öppna i ”tjock klient”
ms-excel:ofe|u|https://sharepoint.com/shared documents/excel.xlsx

Microsoft Word File
Sharepoint’s default shared link is:

1Online https://sharepoint.com/shared document/word.docx
Excel: ms-word:ofe|u|https://sharepoint.com/shared document/word.docx

Win10 slipstreaming – Old News …

Is anyone slipstreaming anymore ? Perhaps not the cululative updates is rather taking the fuzz away …
Still saves the stepps here to remember them…

Get the updates from here
https://www.catalog.update.microsoft.com/Home.aspx

#1 List index numbers of wim/esd file.
dism /Get-WimInfo /WimFile:Sources\install.wim or \install.esd

#2 Use index # for the edition such as home, pro etc… and save it to desktop.
Once done, move it to Sources

dism /Export-Image /SourceImageFile:”Sources\install.wim” /SourceIndex:# /DestinationImageFile:”install.wim” /Compress:Max

#3 Add Windows updates to wim file
dism /mount-wim /wimfile:”Sources\install.wim” /mountdir:mount /index:1
dism /image:mount /add-package /packagepath:package
Dism /unmount-wim /mountdir:mount /commit

Hidden Aruba console command.

  • log in (console, telnet, SSH, etc.) to the CLI
  • type ”edomtset” and hit enter
  • type ”edomtset” and hit enter (yes, again)
  • the prompt will change from ”#” to ”$”
  • hit ? to see what you can do
  • type ”exit” and hit enter when you´re done

    Why you shall need it … i dont know… but probably not safe…