Monday, 13 August 2018

SCCM2012 - Applications stuck in "past due-will be retried"



Problem
Many times some Applications get stuck in the state - Past Due - Will be retried. This is seen in the Software Center-Installation Status.


Reason
This usually occurs for Deployment which have date in the past, and the status in CCM class is actually installed, but not updated.


Resolution
Simply changing the Deployment deadline time fixes this. There is also a script, which changes the times for all Deployments of past.


Syntax
.\IncrementCMDeploymentStartTime.ps1 –SiteCode <EnterYourSiteCode>

Code
Param(          
    [parameter(Mandatory=$true)]          
    $SiteCode
    )

Write-Host "SCCM 2012 SP1 Deadline Time Increment Script"
Write-Host "Version 1.0"
Write-Host "Parameters"
Write-Host "  SiteCode: "$SiteCode -ForegroundColor Green

function GetCMSiteConnection
{
  param ($siteCode)

  $CMModulePath = Join-Path -Path (Split-Path -Path "${Env:SMS_ADMIN_UI_PATH}" -ErrorAction Stop) -ChildPath "ConfigurationManager.psd1"
  Import-Module $CMModulePath -ErrorAction Stop
  $CMProvider = Get-PSDrive -PSProvider CMSite -Name $siteCode -ErrorAction Stop
  CD "$($CMProvider.SiteCode):\"
  return $CMProvider
}

#Main

#Connect to SCCM, must have SCCM Admin Console installed for this to work
#If this fails then connect with the console to the site you want to use, then open PowerShell from that console
$CM = GetCMSiteConnection -siteCode $SiteCode
Write-Host "Connected to:" $CM.SiteServer
Write-Host
Write-Host "---Updating Deployments---"

foreach ($Deployment in (Get-CMDeployment))
{
  if (($Deployment.EnforcementDeadline -lt (Get-Date).ToUniversalTime()) -and ($Deployment.EnforcementDeadline -ne $null))
  {
    Set-CMApplicationDeployment -Application (Get-CMApplication -Id $Deployment.CI_ID) -CollectionName $Deployment.CollectionName -DeadlineDate ($Deployment.EnforcementDeadline).AddMinutes(1) -DeadlineTime ($Deployment.EnforcementDeadline).AddMinutes(1)
    Write-Host "  "$Deployment.AssignmentID"CI Deadline Updated" -ForegroundColor Green
  }
  else
  {
    Write-Host "  "$Deployment.AssignmentID"CI Skipped, deadline time occurs in the future or not specified" -ForegroundColor Red
  }
}


Thursday, 14 June 2018

Useful commands for Sys Admins


  • Given an IP and mask, return the subet the IP belongs to
for /f "tokens=1-8 delims=.- " %i in ('echo 192.168.5.200 255.255.255.0') do set /a Octet1="%i & %m" >nul & set /a Octet2="%j & %n" >nul & set /a Octet3="%k & %o" >nul & set /a Octet4="%l & %p" >nul & Echo %i.%j.%k.%l,!Octet1!.!Octet2!.!Octet3!.!Octet4!,%m.%n.%o.%p


  • Disable the internal speaker beep
sc config beep start= demand & net stop beep

  • List the Volume Shadow Copy Sets
vssadmin list shadows

  • List the volume Shadow Copy storage associations and sizes
vssadmin list shadowstorage

  • Find the domain controller GUID of the specified DC
dsquery * "CN=dcname,OU=Domain Controllers,DC=domainRoot" -scope base -attr objectguid

  • Find DFS roots from Active Directory
dsquery * "CN=Dfs-Configuration,CN=System,domainRoot" -filter "(objectClass=fTDfs)"

  • Find the SQL Server version
sqlcmd -S %server% -d master -W -s "," -Q "SELECT  SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')"

  • From a list of computers, run a command if the machine responds to a ping
for /f %i in (computers.txt) do @ping -n 1 %i >nul & if errorlevel 0 if not errorlevel 1 echo %i

  • Make a bootable CD using the specified boot sector file and source files
oscdimg /m /n /h -bc:\temp\bootsector.bin "c:\temp\source" install.iso

  • Find memory information from a list of machines
for /f %i in (computers.txt) do for /f "tokens=1-5" %m in ('"wmic /node:%i path Win32_PerfFormattedData_PerfOS_Memory get PoolNonpagedBytes,PoolPagedBytes,PoolPagedResidentBytes,FreeSystemPageTableEntries,AvailableMBytes | find /i /v "bytes""') do echo %i,%m,%n,%o,%p,%q

  • Allow remote desktop connections on a the Server (requires reboot)
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t reg_dword /d 0x0

  • Disable hibernation on the Server
powercfg -hibernate off

  • Enable boot logging on the Server
bcdedit /set {default} bootlog yes

  • Adjust Windows Server event log sizes to 128MB
wevtutil sl Security /ms:135266304

  • Find the physical disk sector size
wmic path win32_diskdrive get BytesPerSector

  • Find the current amount of memory used by the file system virtual cache
wmic path Win32_PerfFormattedData_PerfOS_Memory get SystemCacheResidentBytes

  • Use robocopy in backup mode to take a copy of folder-level permissions
Robocopy \\server\source c:\temp\copy zxcvsadfqwer /E /B /COPYALL /R:1 /W:1

Saturday, 24 March 2018

Event ID - 8193, hr = 0x80070539, Volume Shadow Copy Service error



Cause

Volume Shadow Service (VSS) Shadow Copy Optimization Writer' is not functioning correctly. In the event log above the issue involves resolving a SID.

The issue was that the SID being referenced in the event could not be resolved. This was due to a “.bak” entry inside the following registry sub tree.

The Shadow Copy Optimization Writer deletes certain files from volume shadow copies. This is done to minimize the impact of Copy-on-Write I/O during regular I/O on these files on the shadow-copied volume. The files that are deleted are typically temporary files or files that do not contain user or system state.

Resolution

  • Open regedit and locate 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\       WindowsNT\CurrentVersion\ProfileList'
  • Under the ProfileList subkey, delete any subkey that is named SID.bak.
Please backup the registry key first, and then delete the entry with the extra “.bak” and then reboot the machine.


Note :- SID is a placeholder for the security identifier (SID) of the user account that is experiencing the problem. The SID.bak subkey should contain a ProfileImagePath registry entry that points to the original profile folder of the user account that is experiencing the problem.

Friday, 2 March 2018

Complete List of MS Excel Shortcut Key



Ctrl+A - Select All
Ctrl+B - Bold
Ctrl+C - Copy
Ctrl+D - Fill Down
Ctrl+F - Find
Ctrl+G - Goto
Ctrl+H - Replace
Ctrl+I - Italic
Ctrl+K - Insert Hyperlink
Ctrl+N - New Workbook
Ctrl+O - Open
Ctrl+P - Print
Ctrl+R - Fill Right
Ctrl+S - Save
Ctrl+U - Underline
Ctrl+V - Paste
Ctrl W - Close
Ctrl+X - Cut
Ctrl+Y - Repeat
Ctrl+Z - Undo
F1 - Help
F2 - Edit
F3 - Paste Name
F4 - Repeat last action
F4 - While typing a formula, switch between absolute/relative refs
F5 - Goto
F6 - Next Pane
F7 - Spell check
F8 - Extend mode
F9 - Recalculate all workbooks
F10 - Activate Menubar
F11 - New Chart
F12 - Save As
Ctrl+: - Insert Current Time
Ctrl+; - Insert Current Date
Ctrl+" - Copy Value from Cell Above
Ctrl+’ - Copy Formula from Cell Above
Shift - Hold down shift for additional functions in Excel’s menu
Shift+F1 - What’s This?
Shift+F2 - Edit cell comment
Shift+F3 - Paste function into formula
Shift+F4 - Find Next
Shift+F5 - Find
Shift+F6 - Previous Pane
Shift+F8 - Add to selection
Shift+F9 - Calculate active worksheet
Shift+F10 - Display shortcut menu
Shift+F11 - New worksheet
Shift+F12 - Save
Ctrl+F3 - Define name
Ctrl+F4 - Close
Ctrl+F5 - XL, Restore window size
Ctrl+F6 - Next workbook window
Shift+Ctrl+F6 - Previous workbook window
Ctrl+F7 - Move window
Ctrl+F8 - Resize window
Ctrl+F9 - Minimize workbook
Ctrl+F10 - Maximize or restore window
Ctrl+F11 - Inset 4.0 Macro sheet
Ctrl+F1 - File Open
Alt+F1 - Insert Chart
Alt+F2 - Save As
Alt+F4 - Exit
Alt+F8 - Macro dialog box
Alt+F11 - Visual Basic Editor
Ctrl+Shift+F3 - Create name by using names of row and column labels
Ctrl+Shift+F6 - Previous Window
Ctrl+Shift+F12 - Print
Alt+Shift+F1 - New worksheet
Alt+Shift+F2 - Save
Alt+= - AutoSum
Ctrl+` - Toggle Value/Formula display
Ctrl+Shift+A - Insert argument names into formula
Alt+Down arrow - Displayy AutoComplete list
Alt+’ - Format Style dialog box
Ctrl+Shift+~ - General format
Ctrl+Shift+! - Comma format
Ctrl+Shift+@ - Time format
Ctrl+Shift+# - Date format
Ctrl+Shift+$ - Currency format
Ctrl+Shift+% - Percent format
Ctrl+Shift+^ - Exponential format
Ctrl+Shift+& - Place outline border around selected cells
Ctrl+Shift+_ - Remove outline border
Ctrl+Shift+* - Select current region
Ctrl++ - Insert
Ctrl+- - Delete
Ctrl+1 - Format cells dialog box
Ctrl+2 - Bold
Ctrl+3 - Italic
Ctrl+4 - Underline
Ctrl+5 - Strikethrough
Ctrl+6 - Show/Hide objects
Ctrl+7 - Show/Hide Standard toolbar
Ctrl+8 - Toggle Outline symbols
Ctrl+9 - Hide rows
Ctrl+0 - Hide columns
Ctrl+Shift+( - Unhide rows
Ctrl+Shift+) - Unhide columns
Alt or F10 - Activate the menu
Ctrl+Tab - In toolbar: next toolbar
Shift+Ctrl+Tab - In toolbar: previous toolbar
Ctrl+Tab - In a workbook: activate next workbook
Shift+Ctrl+Tab - In a workbook: activate previous workbook
Tab - Next tool
Shift+Tab - Previous tool
Enter - Do the command
Shift+Ctrl+F - Font Drop Down List
Shift+Ctrl+F+F - Font tab of Format Cell Dialog box
Shift+Ctrl+P - Point size Drop Down List

Best Free Spyware Removal Tools






How Spyware Works

Spyware is malicious software that can hijack and cripple your computer. It has been known to masquerade as a prize-notification pop-up window, like the example above and is one method of online identity theft and virus spreading.They're designed to track your Internet habits, nag you with unwanted sales offers or generate traffic for their host Web site. According to some estimates, more than 80 percent of all personal computers are infected with some kind of spyware.

Generally isn't designed to damage your computer. Spyware is defined broadly as any program that gets into your computer without your permission and hides in the background while it makes unwanted changes to your user experience. The damage it does is more a by-product of its main mission, which is to serve you targeted advertisements or make your browser display certain sites or search results.

At present, most spyware targets only the Windows operating system. Some of the more notorious spyware threats include Trymedia, Nuvens, Estalive, Hotbar and New.Net.Domain plugin.

The most common way to infect a computer with spyware is to trick the user into installing it themselves. A user goes to a website and there’s a button that says “Hey, install our fun new game!” And you click on it thinking it’s just a fun new game, but by clicking on it you effectively give that software permission to modify your system. That permission could be totally innocent, but it could also do other things, and you don’t know what those things are.

People should be very wary of anything that’s asking you to install something on your computer, or have access to files on your computer. Your answer should almost always be no, unless you know exactly what you’re getting.

Several free anti-spyware tools that can scan your hard drive, flash drive, external hard drive, etc. to remove spyware. Some of them only work when you manually start the scan but others will monitor your computer all the time to make sure spyware can't modify your computer or monitor your information.

Below are several free anti-spyware tools that can scan your hard drive, flash drive, external hard drive, etc. to remove spyware. Some of them only work when you manually start the scan but others will monitor your computer all the time to make sure spyware can't modify your computer or monitor your information.

Note: All the programs mentioned below are known to scan for spyware but they might not scan for other things like viruses. Other scanners remove some kinds of malware but not spyware, so we've omitted those from this list.

Malwarebytes

 

Malwarebytes is another big-hitter when it comes to cleaning up spyware. It's easy to use and tends to find a lot more malicious items than similar programs.
Malwarebytes is an anti-malware software for Microsoft Windows, MacOS and Android that finds and removes malware made by Malwarebytes Corporation. It is available in a free version, which scans for and removes malware when started manually and a paid version, which additionally provides scheduled scans, real-time protection and a flash-memory scanner.
It scans through registry values and keys, files, and running processes, plus includes a heuristics analyzer to find potentially unwanted programs.

When the scan is complete, it's really easy to tell where the spyware was found and selecting the ones to quarantine is just a click or two away.Malwarebytes can also scan individual files and folders as well as whole hard drives, with the right-click context menu in Windows Explorer. There's an option to scan within archives, ignore certain files/folders, and to scan for rootkits too.


SpywareBlaster

 
SpywareBlaster is different from the rest of these programs since it doesn't scan for existing spyware, though true to its name, it does "blast" new threats before they can reach your system. 

SpywareBlaster prevents the download, installation and execution of most spyware, adware, browser hijackers, dialers and other malicious programs based on ActiveX. SpywareBlaster works on the basis of "blacklists" (Activating the "Killbit") Clsid of known malware programs, effectively preventing them from infecting the protected computer. This approach differs from many other anti-spyware programs, which typically offer the user a chance to scan the hard drive and computer memory to remove unwanted software after it has been installed.

The way it works is that you can enable protection for your web browsers to protect against malicious scripts, exploits, and cookies that track your web behavior. It does this by enabling a pre-made list of blockades (which you can update manually at any time) against certain websites, cookies, and scripts.

SpywareBlaster also allows the user to prevent privacy risks such as tracking cookies. Another feature is the ability to restrict the actions of websites known as distributors of adware and spyware. SpywareBlaster supports several web browsers, including Internet Explorer, Mozilla Firefox and Google Chrome.

SpywareBlaster is currently distributed as freeware, for non-commercial users.

Avast Free Antivirus

Avast Antivirus is a computer security application, which provides protection against a range of potential threats, including viruses, spyware, malware and ransomware. It is currently recognized as the most popular antivirus program on the market and the free version of the software is suitable for personal and home use.
Avast Free Antivirus is an efficient and comprehensive antivirus program. It is one of the most popular antivirus programs available, thanks to the reliable and trustworthy brand that Avast have created. The key features that continue to make Avast Free Antivirus so popular are the easy UI, optimized scanning options and continuously updated database of virus definitions.
Avast can detect and remove spyware before you even know it's on your computer. What makes it different than the two from above is that it's always on and always watching for new threats.
There are lots of settings you can adjust in Avast, like to enable CyberCapture to block unrecognized files, use Hardened Mode to really lock down on security, scan for potentially unwanted programs, scan from Windows Explorer, exclude files/folders/URLs from scans, and lots more.
The software is completely free and, in terms of virus protection, is sufficient for most users. The free version is designed for personal use and offers the same level of protection as the paid 'Pro' version of the software. However the 'Pro' version adds a number of peripheral features and can be used for commercial purposes. 
 


AVG AntiVirus Free




 





AVG Antivirus Free is an antimalware security suite that includes an active file and email scanner, plus Web browsing protection.
It's a another popular antivirus program that serves as a full malware scanner, checking for and removing not only spyware but also ransomware, viruses, and more. all automatically and for free.

It now includes real-time security updates, scans for both malware and performance issues, and even catches malicious downloads before they reach your PC. It’s also got an all-new, refreshingly simple design that shows you exactly how you’re protected. All of this, and it still won’t slow you down!

AVG provides not only protection for your computer but also for your web activity and email. You can perform a full system scan, a boot-time scan, or a custom scan, but there's also a dedicated button that instantly starts a check for spyware on all your removable devices.

Another unique feature in AVG is its Deep Scan option that runs a much slower but also more thorough scan, a good option if nothing else seems to get rid of the spyware. You can configure it to recognize files by their cntent and not their extension, which is ideal if the spyware is using a hidden/false file extension.

The Deep Scan option can also open and scan through over 20 archive file types, much more than most other spyware scanners that usually just support the popular ones (ZIP and RAR).

Although AVG AntiVirus Free provides the same core virus protection as the 'Pro' edition, some peripheral services are missing, when compared to the 'Pro' version. These include Online Shield, which is a feature used to offer extra protection against harmful downloads, and Data Safe, which is an encryption tool for personal files.

Download AVG AntiVirus Free

 



 


Trend Micro HouseCall



Trend Micro HouseCall is a powerful, free software only available for Windows, that belongs to the category Security software with subcategory Anti-virus (more specifically Generic) and has been created by Trend Micro.

HouseCall is a software that requires less storage than most software in the section Security software. It's a very popular software in United States, Canada, and Australia.

HouseCall is our highly popular scanner for identifying and removing viruses, Trojans, worms, unwanted browser plugins, and other malware. It’s quick and easy to use and will work regardless of your existing security solution. What’s more, HouseCall is powered by Trend Micro’s leading cloud-based threat prevention service the Smart Protection Network, enabling it to spot and block all the latest malware.

Users whose machines may have been infected will be notified by Facebook with the option to download the free version of HouseCall to scan and remove the offending malware. They can continue to use Facebook while the scan is taking place and, once complete, a message will pop-up to notify them if the clean-up was successful.

Download Trend Micro HouseCall





Wednesday, 24 January 2018

Robocopy multi-threaded feature to speed up file copy on Windows 10

When copy files to another drive, you typically use the standard select, copy, and paste process. Although this process works perfectly fine, speed becomes a bottleneck as trying to transfer a lot of files can take a very long time.

    

Robust File Copy, which is a command-line tool built into Windows 10 that provides more features to move data to a different location more quickly.
Robocopy so special (and often overlooked) is its multi-threaded feature that allows you to copy multiple files at the same time. Instead of one file at a time using the copy feature built into File Explorer.

You’ll learn to use the multi-threaded copies feature on Robocopy to speed up the transfer process of files and folders to another drive on Windows 10.
 

Process to use multi-threaded feature with Robocopy

  •  Open Start.
  •  Search for Command Prompt, right-click the result, and select Run as administrator.
  •  Type the following command to copy the files and folders to another drive and press Enter.
 robocopy C:\source\folder\path\ D:\destination\folder\path\ /S /E /Z /ZB /R:5 /W:5 /TBD /NP /V /MT:32

Example:
robocopy C:\Users\admin\Documents D:\Users\admin\Documents /S /E /Z /ZB /R:5 /W:5 /TBD /NP /V /MT:32

    

In the above command make sure to change the source and destination paths with your configuration.


Robocopy Command Fully Explained 

  •  /S — Copy subdirectories, but not empty ones.
  • /E — Copy Subdirectories, including empty ones. 
  • /Z — Copy files in restartable mode. 
  •  /ZB — Uses restartable mode, if access denied use backup mode. 
  •  /R:5 — Retry 5 times (you can specify a different number; default is 1 million). 
  • /W:5 — Wait 5 seconds before retrying (you can specify a different number; default is 30 seconds). 
  •  /TBD — Wait for share names to Be Defined (retry error 67). 
  •  /NP — No Progress – don’t display percentage copied. 
  • /V — Produce verbose output, showing skipped files. 
  • /MT:32 — Do multi-threaded copies with n threads (default is 8).

At this point, I am ready to add the new multi-threaded switch: /MT[: n], where n is a number from 1 to 128 and indicates the number of threads to be used. Keep in mind that n is optional and that by default, the /MT switch will use 8 threads. I'll use 32 threads in my example, as I found it to be a good starting point.

Note - Multi-threaded option is not compatible with the /IPG and /EFSRAW switches.

Once you’ve have completed the steps, you’ll notice that copying files and folders will now take significantly less time.









 

Featured post

Top 10 Rare Windows Shortcuts to Supercharge Productivity

  Windows Key + X, U, U: This sequence quickly shuts down your computer. It's a great way to initiate a safe and swift shutdown without...