Posts

Showing posts from September, 2013

Remove Empty lines from text file

Sample Code: get-content "C:\users\sumeet.kumar\Desktop\Services\Scripts\Power Shell Scripts\List All Secondry Drive\sumeet1.txt" | Foreach-Object { ($_  -replace '\s','') } > "C:\Users\sumeet.kumar\Desktop\Services\Scripts\Power Shell Scripts\List All Secondry Drive\FileWithNoEmptyLines.txt"

How to Remove First two lines of text file or csv

How to Remove First two lines of text file Sample Code for text file: (get-Content "C:\Users\sumeet.kumar\Desktop\Services\Scripts\Power Shell Scripts\List All Secondry Drive\Machinelist.txt" | Select-Object -Skip 4) | out-file "C:\Users\sumeet.kumar\Desktop\Services\Scripts\Power Shell Scripts\List All Secondry Drive\sumeet.txt" Sample Code for .csv file: $csv = Get-Content "C:\Users\sumeet.kumar\Desktop\Services\Scripts\Power Shell Scripts\List All Secondry Drive\Machinelist.txt" $csv = $csv[2..($csv.count - 2)] $csv > "C:\Users\sumeet.kumar\Desktop\Services\Scripts\Power Shell Scripts\List All Secondry Drive\machinelist1.txt"

Password Protect Any Folder Without Any Software

Open Notepad and Copy code given below into it. cls @ECHO OFF title coolhacking-tricks.blogspot.com if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST MyFolder goto MDMyFolder :CONFIRM echo Are you sure to lock this folder? (Y/N) set/p "cho=>" if %cho%==Y goto LOCK if %cho%==y goto LOCK if %cho%==n goto END if %cho%==N goto END echo Invalid choice. goto CONFIRM :LOCK ren MyFolder "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" echo Folder locked goto End :UNLOCK echo Enter password to Unlock Your Secure Folder set/p "pass=>" if NOT %pass%==  coolhacks  goto FAIL attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder echo Folder Unlocked successfully goto End :FAIL echo Invalid password goto end :MDMyFolder md MyFold

Download Youtube Videos Without Any Software

This is simple youtube trick which will allow you to  download  any youtube videos  without any software or programme  and in many different video formats such as mpeg4, 3gp, hd and many more from within the youtube site. How To Download Youtube Videos ? 1. First Go to  Youtube  Homepage. 2. Then select the video you want to download. I will demonstrate with video url given below. http://www.youtube.com/watch?v=_JAa3NvP6f4 Now add  save  or  ss  or  kick  before youtube and press enter. 3. After adding any of the above  keyword the above link will become. http://www. save youtube.com/watch?v=_JAa3NvP6f4 Or http://www. ss youtube.com/watch?v=_JAa3NvP6f4 Or http://www. kick youtube.com/watch?v=_JAa3NvP6f4  4. Now you will be redirected to a new page from where you can download youtube videos in any format of your choice. You may also download only the soundtrack of the video in mp3 format.

Error during report processing

Image
Issue: when i try to run a SCCM 2012 report , you get the following error message: Error: An error has occurred during report processing. (rsProcessingAborted)   Solution:  1. Open reporting Manager web console  2. Open Folder Settings  3.Check your user name> Click on Edit and check all the options.  4. Try running a report, it should work now, hopefully.