With the update to Windows 11 24H2, wmic is going away.
In many versions of Windows it has been possible to get the Windows serial number saved in the BIOS using the command:wmic bios get serialnumber
This can also be done with PowerShell:get-ciminstance win32_bios | select SerialNumber
So you can still get the bios key out of the bios from the command line.
Category Archives: Software / Applications
Fix for CrowdStrike Windows Crashes
Earlier today CrowdStrike release an update that can cause Windows based computer to crash to a bluescreen of death. An update to their product has been provided to stop this from impacting further computers.
If a computer is crashing to a BSOD the following can be done to get the computer to work normally.
1. Boot Windows into Safe Mode or the Windows Recovery Environment
2. Navigate to the C:\Windows\System32\drivers\CrowdStrike directory
3. Locate the file matching “C-00000291*.sys” and delete it.
4. Boot the host normally.
Hopefully this helps my fellow techs.
Install Gridcoin Wallet on Ubuntu
Using the Ubuntu terminal, you can install the Gridcoin wallet using the following commands
sudo add-apt-repository ppa:gridcoin/gridcoin-stable
sudo apt-get update
sudo apt-get install gridcoinresearch-qt # installs wallet with GUI
sudo apt-get install gridcoinresearchd # installs headless daemon
CIDR Conversation Table
CIDR Conversion Table
CIDR Length | Mask | # of Networks | # of Hosts |
---|---|---|---|
/1 | 128.0.0.0 | 128 A | 2,147,483,392 |
/2 | 192.0.0.0 | 64 A | 1,073,741,696 |
/3 | 224.0.0.0 | 32 A | 536,870,848 |
/4 | 240.0.0.0 | 16 A | 268,435,424 |
/5 | 248.0.0.0 | 8 A | 134,217,712 |
/6 | 252.0.0.0 | 4 A | 67,108,856 |
/7 | 254.0.0.0 | 2 A | 33,554,428 |
/8 | 255.0.0.0 | 1 A | 16,777,214 |
/9 | 255.128.0.0 | 128 B | 8,388,352 |
/10 | 255.192.0.0 | 64 B | 4,194,176 |
/11 | 255.224.0.0 | 32 B | 2,097,088 |
/12 | 255.240.0.0 | 16 B | 1,048,544 |
/13 | 255.248.0.0 | 8 B | 524,272 |
/14 | 255.252.0.0 | 4 B | 262,136 |
/15 | 255.254.0.0 | 2 B | 131,068 |
/16 | 255.255.0.0 | 1 B | 65,024 |
/17 | 255.255.128.0 | 128 C | 32,512 |
/18 | 255.255.192.0 | 64 C | 16,256 |
/19 | 255.255.224.0 | 32 C | 8,128 |
/20 | 255.255.240.0 | 16 C | 4,064 |
/21 | 255.255.248.0 | 8 C | 2,032 |
/22 | 255.255.252.0 | 4 C | 1,016 |
/23 | 255.255.254.0 | 2 C | 508 |
/24 | 255.255.255.0 | 1 C | 254 |
/25 | 255.255.255.128 | 2 subnets | 124 |
/26 | 255.255.255.192 | 4 subnets | 62 |
/27 | 255.255.255.224 | 8 subnets | 30 |
/28 | 255.255.255.240 | 16 subnets | 14 |
/29 | 255.255.255.248 | 32 subnets | 6 |
/30 | 255.255.255.252 | 64 subnets | 2 |
/31 | 255.255.255.254 | none | none |
/32 | 255.255.255.255 | none | 1 |
Is my installed PHP threadsafe or nonthreadsafe?
If your trying to identify if your version of PHP is threadsafe or nonthreadsafe the the best way to do this is to open a command line or terminal on your server and try the following commands
- On Windows :
php -i|findstr "Thread"
- On *nix:
php -i|grep Thread
Windows Update error 0x80092004 Windows 7 & 2008
Microsoft changed the signing of update packages for Windows 7 and Windows Server 2008 R2 devices on the August 2019 Patch Day for the first time. The company signs packages only with SHA-2 since August 2019; it signed them with SHA-1 and SHA-2 previously but decided to drop SHA-1 because of known weaknesses.
Two updates need to be installed on Windows 7 and Windows Server 2008 R2 systems so that SHA-2 signed updates are installed correctly:
Powershell Find AD users with Change Password at Next Logon Set
We can get the list from our AD of users who have the change their password at the next logon set in Active Directory powershell cmdlet Get-ADUser.
Get-ADUser -LDAPFilter “(pwdLastSet=0)” -SearchBase “OU=Staff,OU=Org Users,DC=Domain,DC=internal” | Select Name,distinguishedName
Export List of Office 365 Licenses by Type
It’s possible to to use Powershell to export lists of users who are allocated different licences in Office 365. This guide will help you export a csv file that contains a list of the users who have a specific license type.
Part 1 – Connecting to Office 365 with Powershell
- First open a powershell console enter the following:
$UserCredential = Get-Credential
- You will be prompted for your Office 365 username and password
- Now we must establish a conenction using the stored credentials:
Connect-MsolService -Credential $UserCredential
- Now that you are connected to Office 365’s powershell interface you can now issue commands to Office 365.
Part 2 – Listing Licences in your account
Enter the command:
Get-MsolAccountSku
This will display a list of licences and the number of each you own and are utilised.
AccountSkuiD: <instancename>:<licencename>
ActiveUnits: The number of licences available based on your subscription
WarningUnits: Licenses in warning state
ComsumedUnits: Licenses in use and assigned to users.
Part 3 – Exporting the Data for a specific Licenes Type
Enter the following command, this will export a list of users with Power BI Standard license assigned to them. Remember to change <instancename> to match the instance name displayed in your output from part 2.
get-MSOLUser -All | where {$_.isLicensed -eq "TRUE" -and $_.Licenses.AccountSKUID -eq "<instancename>:POWER_BI_STANDARD"} | select displayname,userprincipalname,isLicensed | export-CSV c:\crmstandardusers.csv
You will now have a CSV file containing a list of the users with the specified license. You can perform this with any licenses listed from the Get-MsolAccountSku command.
Enable Strict Transport Security on IIS
The following is a guide to enable Strict Transport Security on IIS (Internet Information Server).
Open up IIS Manager and navigate to the the Server Name
Select HTTP Responce
Click on Add, and enter the values as follows
Click ok and then click on the server name again, select the restart option from the actions pane.
You server should now pass Qualys SSL Test for Strict Transport Security.
Provision Windows Store Apps for Windows 10 Imaging
When building fat Windows 10 Images it is necessary to sometimes install Windows Store apps, however you can’t just install them from the standard Windows Store, doing so will cause sysprep to fail. At no point should you try to run any Windows store apps when building an image.
DISM can be used to provision the app for all users in your image. The following is an example command using Microsoft Reader, it’s dependance of Microsoft VCLibs and finally it’s licence file:
Dism /Online /Add-ProvisionedAppxPackage /PackagePath:Microsoft.Reader_2017.612.315.3642_neutral_~_8wekyb3d8bbwe.AppxBundle /DependencyPackagePath:Microsoft.VCLibs.120.00_12.0.21005.1_x64__8wekyb3d8bbwe.Appx /LicensePath:Microsoft.Reader_8wekyb3d8bbwe_e5086f30-ff13-cf16-91fb-0cc6ed9c5613.xml
To obtain the app files you must download them from the Microsoft Windows Store for Business. Sign in with a user account and find the package you are looking for.
Once you have found the app you’re looking for select offline for the licence type.
Click Manager, then no the next screen click Get App.
Now Select your Processor architecture, if 32 bit windows select x86, for 64 bit select X64, Finally select your language. Ignore the Download button at the end of the line this will download a JSON file not required for this process.
Scroll down and click the Download link under “Download the package for offline use”, this will download the Package for Reader.
The next link down the page is the licensing file for Offline install, download this preferably to the same location.
Finally after the licence link you will see “Required frameworks”, this of course depends on the app you are trying to download, these may be architecture dependent also. Download these files into the same location as well.
Once you have all the files in a single folder or location open a command prompt or powershell window with administrator privileges and change directory to the location of your downloaded files from the Windows Store.
Execute the DSIM command like the following:
Dism /Online /Add-ProvisionedAppxPackage /PackagePath:PackageFileName /DependencyPackagePath:DependencyPackageFileName /LicensePath:LicenceFilename
Once this as executed the package will install for all users, and your windows image will seal correctly.
TechNet – DISM App Package (.appx or .appxbundle) Servicing Command-Line Options