Updated PowerShell script to loop through files for printing.

After finishing my script from the previous post I thought there has to be a better way to write this and reduce the lines of code. Not that 5 separate lines is a lot. But, if the list of items to print grew larger say to 15 documents, and was in different subdirectories then it might get complicated. So, I set about trying to find a way to use the ForEach-Object cmd. After some trial and error I have come up with this.

$Directory = “\\SVR1\DATA\Reports\Trading\”

Get-ChildItem -path $Directory -recurse -include *.pdf | ForEach-Object {Start-Process -FilePath $_.fullname -Verb Print -PassThru | %{sleep 10;$_} | kill }

(more…)

Read More

Offline install of .NET Framework 3.5 in Windows 10

The .NET Framework is an integral part of many applications running on Windows and provides common functionality for those applications to run. Normally, before running/installing such applications, we need to enable .NET Framework from the Control Panel on the computer.  So, you may first check if the .NET Framework 3.5 is available in the Control Panel on Windows 10 Technical Preview and if available, you may enable it from the Control Panel to install it on the computer. To check if the.NET Framework 3.5 is available in Control Panel and to enable it, please follow these steps:

 

a) Press “Windows Logo” + “R” keys on the keyboard.

b) Type “appwiz.cpl” in the “Run” command box and press “ENTER”.

c) In the “Programs and Features” window, click on the link “Turn Windows features on or off”. (more…)

Read More

How to Uninstall Windows 10’s Built-in Apps and Reinstall Them

Windows 10 includes a variety of universal apps, and there’s no easy way to hide them from the “All Apps” view in the new Start menu. You can uninstall them, but Microsoft doesn’t allow you to easily uninstall them in the usual way.

You probably don’t want to do this. These apps take up very little space on your device so it’s best to just ignore them if you don’t want to use them. But, if you really want to uninstall them, you can. If you’ve already uninstalled included apps, you can get them all back with a single command. (more…)

Read More

Automate the Windows installation by using a sample answer file

Download the Windows Deployment sample answer files. In Notepad, open the file for your PC type, for example, Autounattend_x64_UEFI.xml. This file contains all of the settings that are needed to automate the installation process.

If you’re creating PCs for consumers, add your technical support info to the OEMInformation section, including your company name (Manufacturer) and website (SupportURL). For info, see the Licensing and Policy guidance on the OEM Partner Center. (more…)

Read More

Generate a Random Character String in Excel

You may find yourself faced with a need to generate a ton of random strings of characters.

For example, you may have a list of usernames that need passwords – you could be lazy and say everyone’s password is password, but I will assume you know better than that!

Generate Random Number String

To generate a random number string in Excel, simply use a formula like this:

=RANDBETWEEN(0,9)

This will randomly display a number between 0 and 9 each time the page is refreshed. (more…)

Read More

Computer shutdown (remote)

Shutdown Command Examples

To bring this all together, let’s go over a few examples. First, let’s say that you are connected to your office PC via Remote Desktop and you want to reboot it immediately. You know that no one else is using it and all of your documents and data are saved. While in the Remote Desktop session, launch Command Prompt on your office PC and type the following command:

shutdown -r -f -t 0

(more…)

Read More