How to Use Slmgr to Change, Remove, or Extend Your Windows License

Windows activation is designed to be as foolproof as possible, so Microsoft’s graphical tools keep it simple. If you want to do something more advanced like remove a product key, force an online activation, or extend the activation timer, you’ll need Slmgr.vbs.

This command line tool is included with Windows, and provides options unavailable in the standard activation interface provided on the Update & Security > Activation screen in the Settings app.

First: Open an Administrator Command Prompt Window

To use this tool, you’ll want to launch a Command Prompt with Administrator access. To do so on Windows 8 or 10, either right-click the Start button or press Windows+X. Click the “Command Prompt (Admin)” option in the menu that appears. On Windows 7, search the Start menu for “Command Prompt,” right-click it, and select “Run as Administrator.”

View Activation, License, and Expiration Date Information

To display very basic license and activation information about the current system, run the following command. This command tells you the edition of Windows, part of the product key so you can identify it, and whether the system is activated.

slmgr.vbs /dli

To display more detailed license information–including the activation ID, installation ID, and other details–run the following command:

slmgr.vbs /dlv

View the License Expiration Date

To display the expiration date of the current license, run the following command. This is only useful for Windows system activated from an organization’s KMS server, as retail licenses and multiple activation keys result in a perpetual license that won’t expire. If you haven’t provided a product key at all, it’ll give you an error message.

slmgr.vbs /xpr

Uninstall the Product Key

You can remove the product key from your current Windows system with Slmgr. After you run the below command and restart your computer, the Windows system won’t have a product key and will be in an unactivated, unlicensed state.

If you installed Windows from a retail license and would like to use that license on another computer, this allows you to remove the license. It could also be useful if you’re giving that computer away to someone else. However, most Windows licenses are tied to the computer they came with–unless you purchased a boxed copy.

To remove uninstall the current product key, run the following command and then restart your computer:

slmgr.vbs /upk

Windows also stores the product key in the registry, as it’s sometimes necessary for the key to be in the registry when setting up the computer. If you’ve uninstalled the product key, you should run the below command to ensure it’s removed from the registry as well. This will ensure people who use the computer in the future can’t grab the product key.

Running this command alone won’t uninstall your product key. It’ll remove it from the registry so programs can’t access it from there, but your Windows system will remain licensed unless you run the above command to actually uninstall the product key. This option is really designed to prevent the key from being stolen by malware, if malware running on the current system gains access to the registry.

slmgr.vbs /cpky

Set or Change the Product Key

You can use slmgr.vbs to enter a new product key. If the Windows system already has a product key, using the below command will silently replace the old product key with the one you provide.

Run the following command to replace the product key, replacing #####-#####-#####-#####-##### with the product key. The command will check the product key you enter to ensure it’s valid before using it. Microsoft advises you restart the computer after running this command.

You can also change your product key from the Activation screen in the Settings app, but this command lets you do it from the command line.

slmgr.vbs /ipk #####-#####-#####-#####-#####

Activate Windows Online

To force Windows to attempt an online activation, run the following command. If you’re using a retail edition of Windows, this will force Windows to attempt online activation with Microsoft’s servers. If the system is set up to use a KMS activation server, it will instead attempt activation with the KMS server on the local network. This command can be useful if Windows didn’t activate due to a connection or server problem and you want to force it to retry.

slmgr.vbs /ato

Activate Windows Offline

Slmgr also allows you to perform an offline activation. To get an installation ID for offline activation, run the following command:

slmgr.vbs /dti

You’ll now need to get a a confirmation ID you can use to activate the system over the phone. Call the Microsoft Product Activation Center, provide the installation ID you received above, and you’ll be given an activation ID if everything checks out. This allows you to activate Windows systems without Internet connections.

To enter the confirmation ID you’ve received for offline activation, run the following command. Replace “ACTIVATIONID” with the activation ID you’ve received.

slmgr.vbs /atp ACTIVATIONID

Once you’re done, you can use the slmgr.vbs /dli or slmgr.vbs /dlv commands to confirm you’re activated.

This can generally be done from the Activation screen in the Settings app if your PC isn’t activated–you don’t have to use the command if you’d rather use the graphical interface.

Extend the Activation Timer

Some Windows systems provide a limited time where you can use them as free trials before entering a product key. For example, Windows 7 offers a 30-day trial period before it begins complaining at you. To extend this trial period and reset it back to 30 days remaining, you can use the following command.As Microsoft’s documentation puts it, this command “resets the activation timers.”

This command can only be used several times, so you can’t indefinitely extend the trial. The number of time it can be used depends on the “rearm count,” which you can view using the slmgr.vbs /dlv command. It seems different on different versions of Windows–it was three times on Windows 7, and it seems to be five times on Windows Server 2008 R2.

This no longer seems to work on Windows 10, which is very lenient if you don’t provide it a product key anyway. This option still works on older versions of Windows and may continue to work on other editions of Windows, such as Windows Server, in the future.

slmgr.vbs /rearm

Slmgr.vbs Can Perform Actions on Remote Computers, Too

Slmgr normally performs the actions you specify on the current computer. However, you can also remotely administer computers on your network if you have access to them. For example, the first command below applies to the current computer, while the second one will be run on a remote computer. You’ll just need the computer’s name, username, and password.

slmgr.vbs /option
slmgr.vbs computername username password /option

The Slmgr.vbs command has other options, which are useful for dealing with KMS activation and token-based activation. Consult Microsoft’s Slmgr.vbs documentation for more details.

SOURCE :

How to Use Slmgr to Change, Remove, or Extend Your Windows License

How to change LCD brightness from command line Debian Ubuntu Mint Linux

debian-logo

To change LCD brightness from command line:

Open your terminal and type this

xrandr -q | grep " connected"

it will gives you the output as eDP-1  connected 1680×1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm

There eDP-1  Stands for your display .

so now you have to do as

xrandr --output eDP-1 --brightness 0.5

there 0.5 stands for brightness and it ranges from 0.0 to 1.0 . 0.0 -> Full black .so you have to choose the required value of brightness .

from http://askubuntu.com/questions/149054/how-to-change-lcd-brightness-from-command-line-or-via-script

Migrating a Site out of Multisite Manually

The site you’re moving out of Multisite will have three components that you need to copy from the Multisite network:

  • theme and plugin files—you might copy these across or reinstall them in the new site
  • uploads—you’ll find these in the site’s subdirectory in wp‑content/uploads/sites
  • database tables—you don’t need all of the database tables but just the ones relating to this site

Note: If your Multisite network was created prior to WordPress 3.5, you won’t have a sites folder. Instead you’ll have a blogs.dir folder in wp-content with all of the upload files for the subsites. This will have a numbered folder for the site you’re migrating, which you copy instead. I’ll cover this in more detail below.

Before you start, think about the reasons you’re migrating the site. Could it be purely to have a new domain name? If this is the case, then the free domain mapping plugin will let you give individual sites their own domain, and visitors will never see the domain of your Multisite network.

But if this isn’t the only reason, then read on!

Before you do anything like this, it’s a good idea to back up your Multisite installation. Use your preferred backup plugin, or a combination of FTP and phpMyAdmin if you prefer to work manually.

You’ll use this backup to copy the relevant files to your new site, and it also gives you some peace of mind in case you have any problems.

Each site in a Multisite network has its own unique numerical ID. This is used to identify its folder in the wp-content/uploads/sites directory (or wp-content/blogs.dir if your Multisite network is older—see above), and also to identify the database tables for that site.

Find this by going to Network Admin > Sites and then selecting the Edit option for the site you’re working with. The URL WordPress takes you to will give you the site’s ID. The URL should be in the form http://mynetwork.com/wp-admin/network/site-info.php?id=XX.

XX is the ID of your site, and will be the name of the folder containing its files, as well as the prefix for its database table names.

As you’re only moving one child site and not the whole installation, you won’t need the contents of your entire database.

In PhpMyAdmin, click on the Export tab. Then find the tables relating to the site you’re exporting. They will begin with wp_XX_, where XX is the ID of your site. An example is shown below.

moving-a-site-out-of-wordpress-multisite-phpmyadmin-siteID-tables

Select all of the tables relating to your child site and then export them.

Note: WordPress Multisite stores all data relating to users of the network in the wp_users and wp_usermetatables: it doesn’t create separate ones for each site. If you have a lot of users on your site which you want to copy across from the network, then you might want to export those tables as well, import them to the new site and edit users in the admin screens to remove any that are not relevant to the new site. However, if your site just has one or two users, it’s easier to recreate them on the new site. For more information on Multisite and database tables, see this tutorial on the WordPress database and Multisite.

Make a copy of the sql file that’s been downloaded to your machine and give it a name that tells you what it is (for example by adding copy to its name). Open it in a code editor.

Change all instances of the site’s domain in the Multisite network to its new single site domain. For example if your site was at http://network.com/mysite, change it to to http://mysite.com. If your network uses subdomains, you’ll need to change all instances of http://mysite.network.com. If you do this I’d advise also running a check for the subdirectory version just in case. Save your file.

Note: If your site had a domain mapped to it which isn’t the domain you’re moving it to, you’ll need to replace that with the new domain too. Tread very carefully here, and keep backups!

The database tables in your new single site installation won’t have prefixes for the site ID, so you’ll need to remove these. In your sql file, replace all instances of wp_XX_ with wp_, where XX is your site ID.

Now save the sql file.

In phpMyAdmin, create a new database in the location for your new site and install WordPress in the normal way.

Identify the plugins used by the child site and either install them in your new WordPress site via the Pluginsscreen or upload them from the backup you took of your old site.

Do the same for any themes your site is using—copy them from your backup to the wp-content/themesdirectory of your new standalone WordPress installation, or just reinstall them.

Copy the uploads from your old site to the new one:

  • If the network was created after WordPress 3.5, it will have a sites folder in wp-content/uploads. Find the subfolder with your site’s ID and upload its contents to the wp-content/uploads folder in your new site.
  • If the network is an older one and has a blogs.dir folder, that will also contain a folder with your site’s ID. That will then have a subfolder called files. Copy the contents of the files folder to the wp-content/uploads folder in your new site.

Note: you may need to delete any folders WordPress has created in your new uploads folder to avoid any clashes.

Once you’ve done all this, activate any themes and plugins.

Now that you’ve installed your themes and plugins, you need to import the database tables.

Before you upload the tables from your old site, you’ll need to delete the duplicate ones which WordPress has added to your new site.

In phpMyAdmin, drop the following tables from your database:

  • wp_commentmeta
  • wp_comments
  • wp_links
  • wp_options
  • wp_postmeta
  • wp_posts
  • wp_terms
  • wp_term_relationships
  • wp_term_taxonomy

The screenshot shows my database with just those tables selected:

moving-a-site-out-of-wordpress-multisite-phpmyadmin-dropping-tables

Select them, click on the With selected: dropdown box, and select Drop. When prompted, click Go.

Note: Don’t delete the wp_usermeta or wp_users tables, unless you’ve chosen to copy these across from the network as well (see above).

Next upload the database you’ve edited:

  • Click the Import tab.
  • Click the Choose file button.
  • Select the sql file you’ve edited and click Choose or OK.
  • Click the Go button.
  • After a while (depending on the size of your database), you will see a message telling you the upload has successfully finished.

Clear your browser’s cache. This avoids any problems you may have if the browser has cached content from the old site.

Now log in to the WordPress admin for the remote site. If you moved the user tables across, your login details will be the same as for your old site, but if you didn’t, these will be whatever you specified when you installed WordPress in the new location.

Visit the Permalinks screen and turn pretty permalinks back on.

Check that all your links are working ok and that widgets and plugins are behaving as they should. If not, you can either step back through the process, using your backups where you need to, or simply set up the plugins and widgets from within your new site.

Once you are completely happy that everything’s working as it should, remove the site from your Multisite installation. I’d recommend leaving this a week or so in case you spot anything that hasn’t moved across. In the meantime, you can configure the old site’s domain to map to the new one, either by using a plugin or in CPanel.

Phew! It was a long and slightly complicated process, but you’ve done it.

Migrating a site out of WordPress Multisite and into its own installation isn’t something you can do quickly or without being very thorough, but it is possible and I’ve done it a few times. If you follow the steps above and make sure you have backups in case of any problems, then you should find it works smoothly for you.

FROM http://code.tutsplus.com/tutorials/moving-wordpress-moving-a-site-out-of-a-multisite-network–cms-22772
Rachel McCollin

WordPress Developer and Writer, Birmingham UK
Rachel McCollin is a WordPress developer who writes books, articles and tutorials about web design and development, with a focus on WordPress and on responsive and mobile development. She runs a web design agency in Birmingham, UK and has published three books on WordPress, including WordPress: Pushing the Limits, an advanced resource for WordPress developers. She’s currently writing her fourth book.

 

 

Mail server settings apple accounts

Apple Email Logo

iCloud Mail uses the IMAP and SMTP standards supported by most modern email apps. iCloud does not support POP.
IMAP information for the incoming mail server

Server name: imap.mail.me.com
SSL Required: Yes
If you see an error message when using SSL, try using TLS instead.
Port: 993
Username: This is usually the name part of your iCloud email address (for example, emilyparker, not emilyparker@icloud.com). If your email client can’t connect to iCloud using just the name part of your iCloud email address, try using the full address.
Password: Your iCloud password

SMTP information for the outgoing mail server

Server name: smtp.mail.me.com
SSL Required: Yes
If you see an error message when using SSL, try using TLS or STARTTLS instead.
Port: 587
SMTP Authentication Required: Yes
Username: Your full iCloud email address (for example, emilyparker@icloud.com, not emilyparker)
Password: Your iCloud password

How to autostart xscreensaver in debian

debian-logo

install xscreensaver in the usual way using the Synaptic Package Manager.
configure xscreensaver from the terminal using xscreensaver-demo (without privileges – no sudo su).

then how to autostart xscreensaver in debian jessie.

create a file in /home/yourname/.config/autostart called Xscreensaver.desktop thus:-

#!/usr/lib/env/ xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en-US]=gnome-panel-launcher
Icon=gnome-panel-launcher
Exec=xscreensaver
Name[en-US]=Xscreensaver.desktop
Name=Xscreensaver

for yourname read your account name. apart from the line Exec=xscreensaver this probably doesn’t do much.
and that’s it. i share this after months of trawling the internet and not finding out how to do it.
xscreensaver will create a file called .xscreensaver in /home/yourname/.
this worked for me.

from http://www.linuxquestions.org/questions/debian-26/how-to-autostart-xscreensaver-in-debian-jessie-4175568943/

LEMP Linux Nginx MariaDB Php Phpmyadmin on Debian Jessie

lemp_deb

Here’s a look at how I configured a LEMP server on Debian Jessie

Install nginx using command :

sudo apt-get install nginx
sudo apt-get install php5 php5-fpm php5-mysql

This location will be your Document Root in the nginx virtual configuration file later on. By adding a -p to the line of code, the command automatically generates all the parents for the new directory.

sudo mkdir -p /var/www/wordpress.dev/www

We need to grant ownership of the directory to the right user, instead of just keeping it on the root system. You can replace the “www-data” below with the appropriate username.

sudo chown -R www-data:www-data /var/www/wordpress.dev/www
sudo vim /var/www/wordpress.dev/www/index.html

We can add some text to the file so we will have something to look at when the the site redirects to the virtual host.

<html>
  <head>
    <title>wordpress.dev</title>
  </head>
  <body>
    <h1>Success: You Have Set Up a Virtual Host</h1>
  </body>
</html>

The next step is to create a new file that will contain all of our virtual host information.

vi /etc/nginx/sites-available/wordpress.dev
server {
    root /var/www/wordpress.dev/www;
    index index.html index.htm index.php;

    access_log /var/log/nginx/wp.dev.access.log;
    error_log /var/log/nginx/wp.dev.error.log;

    server_name wordpress.dev;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

Make a symbolic link to /site-enabled to enable it

sudo ln -s /etc/nginx/sites-available/wordpress.dev /etc/nginx/sites-enabled/wordpress.dev

To check if syntax works

sudo nginx -t

then

sudo service nginx restart

Now install MariaDB

apt-get install mariadb-server mariadb-client

check it

mysql -V

secure it

mysql_secure_installation

I must stress that this is not recommended for a production environment.

To avoid  this error in phpmyadmin

ERROR 1698 (28000): Access denied for user 'root'@'localhost'
mysql -u root -p

At the mysql prompt enter the following:

use mysql;
update user set plugin='' where User='root';
flush privileges;
exit

and phpMyAdmin

sudo apt-get install phpmyadmin