Category: Windows 7

Delete All Files and Folders Under a Folder

Very simple to do with Powershell, Open a powershell command prompt and type:

Remove-Item c:\DirYouWantToDelete\* -recurse -force

Share

Cannot Search Within File Contents of PDF Documents on Windows 7 64 bit

Check to see if you have the iFilter installed:

Open Control Panel and type in the search box “Change how windows searches” and click on the link shown:

Select Advanced

Then select the File Types Tab and scroll down to PDF and you will see “Registered iFilter is not found”

Cancel and close out of these screens and goto http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025 and download and install the fix from adobe.

Share

Add printer IP port using Powershell

The below will create a TCP/IP printer port using PowerShell:

$server=”servername”
$printerip=”1.1.1.1″
$port = ([WMICLASS]“\\$server\ROOT\cimv2:Win32_TCPIPPrinterPort”).createInstance()
$port.Name=”IP_10.25.128.31″
$port.SNMPEnabled=$false
$port.Protocol=1
$port.HostAddress=$printerip
$port.Put()
$port

To Automate it somewhat you can feed the parameters into it using arguments, you can run the commands using excel and copy into a batch file.

# This script requires 3 paramaters at the command in the form:
# .\CreatePrinterPort.ps1 servername IPAddress PortName
$server=$args[0]
$printerip=$args[1]
$port = ([WMICLASS]“\\$server\ROOT\cimv2:Win32_TCPIPPrinterPort”).createInstance()
$port.Name=$args[2]
$port.SNMPEnabled=$false
$port.Protocol=1
$port.HostAddress=$printerip
$port.Put()
$port

Share