Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Friday, July 24, 2020

Command line to stop Windows 10 updates

To stop Windows 10 updates:

> net stop wuauserv
> net stop bits
> net stop dosvc

Resume it:

> net start wuauserv
> net start bits
> net start dosvc

Tuesday, May 16, 2017

Query windows patch via command line

To check if a windows patch (e.g. KB1234567) has been installed, run the following command line:

     C:> wmic qfe | find "1234567"


Friday, June 10, 2016

Backup and Restore with PostgreSQL


Enter psql
DOS> psql -U user database_name
DOS> psql database_name (if no password defined)

Drop DB
DOS> dropdb database_name
PSQL# drop database database_name

Create DB
DOS> createdb database_name
PSQL# create database database_name

Dump DB
DOS> pg_dump database_name > file_name

Restore from Dump
DOS> psql -U user -d database_name -f file_name


Wednesday, January 25, 2012

Command line to get installed software / windows updates information

One can use wmic command to get the list of product installed in Windows:
 c:\> wmic product

You can also specify which data fields you want to retrieve, e.g.:
 c:\> wmic product get caption

We can also use wmic command to get the list of windows updates made on the machine:
 c:\> wmic qfe list

Monday, November 14, 2011

Enable/Disable network interface via command line

c:\> netsh interface set interface "INTERFACE_NAME" enable

OR

c:\> netsh interface set interface "INTERFACE_NAME"disable

CSP on Apache

To add CSP to root if sort of funny. The following will NOT work for most cases !!     <LocationMatch "^/$">        Header s...