20 September, 2021

Wuauclt Usage

 WUAUCLT.EXE 

A command line utility to control the Windows Update Automatic Update CLient

This utility is provided for all Windows operating systems prior to the release of Windows 10/Server 2016. It provides the ability to invoke an update scan or report statistics to a WSUS (Windows Software Update Service).

For reasons known only to Micrososoft, they did not include a help option (/?) as one of  the parameters for this utility. I've only listed options that have a known effect to the client.

  • /DetectNow - To run an immediate poll of the WSUS server for updates
  • /resetAuthorization - To reset the authorization on the server and the client. In fact, it is a new registration on the WSUS server. Useful when the client registraation is corrupt, deleting it on the server and the command wuauclt /detectnow /resetAuthorization re-registered on the server with simultaneous request for list of updates
  • /reportnow To reset the statistics on the server the Other parameters are not so obvious and, most importantly, their application is not clear and usually causes no change
  • /ShowSettingsDialog - Displays the dialog to set the schedule for the installation of the updates
  • /ResetEulas - to reset the EULA for updates
  • /ShowWU - go to website of MS updates
  • /ShowWindowsUpdate - go to website of MS updates
  • /UpdateNow - Immediately starts the update process, clicking the same button in the notification window when updates are available.
  • /ShowWUAutoScan - unknown
  • /ShowFeaturedUpdates - unknown
  • /ShowOptions - unknown
  • /ShowFeaturedOptInDialog - unknown
  • /DemoUI - Show icon in tray - settings dialog schedule the installation of updates or setup, depending on the status.

 

07 September, 2019

Debian Buster: Prevent the "POP" from audio device when sound played

Debian Buster by default will have the power saving features enabled for most devices, this includes the audio device. This is all well and good when buster is installed on a mobile device, but is annoying on a desktop device.

The problem that this causes is that the kernel will shutdown the audio device in order to save power, with the downside that an audible pop/click will be heard when a sound is made (and example would be the "bell" in the terminal or a notification sound).

A few seconds after the sound is played the kernel will put the audio device back into power saving.

This can be temporarily disabled with the following two commands. Note that this if for the intel hda and will not survive a reboot.

echo 0  > /sys/module/snd_hda_intel/parameters/power_save 
echo N > /sys/module/snd_hda_intel/parameters/power_save_controller

This will only work if you have an intel system board and are using the inbuilt sound. If you are unsure, examine the pci bus with lspci -v 

To make this setting stick I setup rc-local support in systemd. This will make systemd execute the /etc/rc.local script if it exists.

First, check to see if systemd has a rc-local service defined.

sudo systemctl status rc-local

By default this will not exist, so lets create one !
first we create a service definition file rc-local.service in /etc/systemd/system/

sudo nano /etc/systemd/system/rc-local.service

and past in the following contents

 [Unit]
 Description=/etc/rc.local Compatibility
 ConditionPathExists=/etc/rc.local

[Service]
 Type=forking
 ExecStart=/etc/rc.local start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes
 SysVStartPriority=99

[Install]
 WantedBy=multi-user.target

Next, create /etc/rc.local and put the commands we used before to turn off the power saving feature.

sudo nano /etc/rc.local

Paste in the following:


#!/bin/bash

sleep 10
echo 0 > /sys/module/snd_hda_intel/parameters/power_save 
echo N > /sys/module/snd_hda_intel/parameters/power_save_controller


Set the script to be executable with chmod +x /etc/rc.local
Next we enable our service in systemd with:


sudo systemctl enable rc-local

and start it with:

sudo systemctl start rc-local.service

To confirm that the service is running:

sudo systemctl status rc-local.service

You should see output similar to this:

● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset:
  Drop-In: /usr/lib/systemd/system/rc-local.service.d
           └─debian.conf
   Active: active (exited) since Sat 2019-09-07 09:37:45 AEST; 33min ago
  Process: 4583 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)

Reboot and enjoy your pop free sound.




 
 

09 July, 2019

How to install steam on Debian 10 (Buster)


Note: console commands are listed as bold and italic.

Ensure that contrib and non-free are added to your sources.list (/etc/apt/sources.list). I've provided an example of mine below:

deb http://mirror.aarnet.edu.au/debian/ buster main contrib non-free
deb-src http://mirror.aarnet.edu.au/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

# buster-updates, previously known as 'volatile'
deb http://mirror.aarnet.edu.au/debian/ buster-updates main contrib non-free
deb-src http://mirror.aarnet.edu.au/debian/ buster-updates main contrib non-free




update your apt cache with sudo apt update. If all goes well, you can install your non-free grapohics driver, which in my case is nVidia.

with sudo apt install nvidia-driver

Since the Steam client is a 32bit application we will also need to enable the i386 architecture in apt.

use dpkg --add-architecture i386 since we've made a change to apt, you'll need to update your apt cache again with sudo apt update.

Finally install the nvidia-driver-libs-i386 package with sudo apt install nvidia-driver-libs-i386.

You should end up with both the 64bit and 32bit nvidia libraries, which should look similar to this:

dpkg -l | grep nvidia-driver
ii  nvidia-driver                        418.74-1 amd64 NVIDIA metapackage
ii  nvidia-driver-bin                  418.74-1 amd64 NVIDIA driver support binaries
ii  nvidia-driver-libs:amd64     418.74-1 amd64 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries)
ii  nvidia-driver-libs:i386         418.74-1 i386 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries)
ii  nvidia-driver-libs-i386:i386 418.74-1 i386 NVIDIA metapackage (OpenGL/GLX/EGL/GLES 32-bit libraries)


Finally, we can install steam with sudo apt install steam.
 

 

04 July, 2017

Active Directory Users and Computers filter for disabled computer accounts

Use the following LDAP filter shows all the disabled computers in a particular OU:

(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=2))

To filter out disabled computers, showing only active objects use this:

(&(objectCategory=Computer)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

08 June, 2017

Distribution Point Pre-Requisits

Installing a Distribution Point for ConfigMgr (SCCM) can be as simple as adding a site server and selecting the distribution point role, most of the time the install is flawless but it can take what feels like as ice age to complete as ConfigMgr will install IIS and the other pre-requisits.

Myself, I prefer to pre-install the pre-requisits myself to speed up the installation process.
If, like me your impatient then add the features/roles below for a basic distribution point.
  • Remote Differential Compression
  • Background Intelligent Transfer Service (BITS) 
  • Web Server (IIS)
  • IIS Configuration:
    • Application Development: 
      • ISAPI Extensions
    • Security: 
      • Windows Authentication
    • IIS 6 Management Compatibility:
      • IIS 6 Metabase Compatibility
      • IIS 6 WMI Compatibility.
If you intend to also have PXE support on your distribution point, also add the Windows Deployment Services role but DO NOT configure it.

20 January, 2016

Adding .NET 3.5 to Windows 10 with DISM

Adding the .NET Framework 3.5 to Windows 10 can sometime prove problematic at best as W10 can throw numerous errors back at you when attempting to add the feature via the GUI.

The simplest solution (and to prevent hair loss) is to use DISM.

Open an elevated command prompt and enter the following command:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs

The /Source argument is used to specify the install location for the side by side folder on your installation media. This folder can also be located on a network share of your choice.

If everything runs as it should, DISM will respond as shown below:
 

Checking the features list via the GUI will now present you with the good news:





12 January, 2016

How to Export Drivers Using Powershell in Windows 8.1 and above

In Windows 8.1 Update 1 there appeared a new Powershell cmdlet Export-WindowsDriver, that allows to export all the installed third-party drivers (non-Microsoft ones) directly from the Driver Store. The news is excellent, since earlier to export and backup the drivers, you had to use third-party apps, like DoubleDriver, DriverMax, etc.
So, to export all the installed third-party drivers in Windows 8.1, run the Powershell console under the administrator privileges and enter the following command:
Export-WindowsDriver –Online -Destination c:\export-drivers
  
Note: The driver files are saved to directory c:\export-drivers. It must be created in advance.

If you have to export drivers from the offline Windows image mounted, for instance, to c:\win8_image, the command looks like this:
 
Export-WindowsDriver -Path c:\win8_image -Destination c:\export-drivers

After you run the cmdlet, the data on the exported drivers that are not a part
of the system will be displayed on the screen.
 
When the export is over, some folders with the name of the corresponding INF files of the drivers appear in the specified folder.
Each folder contains all the files necessary to install a driver in the system (the tool creates the list of files according to the description in the INF file of the driver).

 To display the list of all exported drivers in a convenient form with the indication of the class, vendor and the driver version, let’s export the drivers with the two commands:

$BackupDrivers = Export-WindowsDriver -Online -Destination c:\export-drivers
 
After that let the results be displayed in the table:

$BackupDrivers | Select-Object ClassName, ProviderName, Date, Version | Sort-Object ClassName 

The drivers from this archive can be distributed to other systems either manually or automatically with DISM, PowerShell, MDT, SCCM, etc.
note: this post was copied verbatim from http://woshub.com/how-to-export-drivers-using-powershell-in-windows-8-1-u1/
and is reproduced here for my use.