List inactive computers in active directory

How to list all inactive accounts (under active directory) for specified number of days, using power shell.
Note: Carefully if you run this as an auto-purge. Auto-purge of accounts is risky.

GET-QADCOMPUTER -SizeLimit 0 -IncludedProperties LastLogonTimeStamp | where { ($CompareDate-$_.LastLogonTimeStamp).Days -gt $NumberDays } | Select-Object Name, LastLogonTimeStamp, OSName, ParentContainerDN | Sort-Object ModificationDate, Name | Export-CSV $CSVFileLocation 

Disable (hide) Windows Start bar

If you are using a dock bar and want to hide completely windows start bar here is a VB version on how to do it (works for XP and above):

In a module:

'API declarations
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

'your function
Public Sub HideWindowsTaskBar(Optional show As Boolean = True)    
    'find start bar window and get its hwnd
    Dim hwnd As Long
    hwnd = FindWindow("Shell_traywnd", "")
    'call setWindowsPos to show/hide the window
    If show = True Then
        Call SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
        Call SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
    End If
End Sub


'to hide it
Call HideWindowsTaskBar()

'to show it
Call HideWindowsTaskBar(False)

Oracle XE 11G Installation on Win7 x64

This article describe how to treat Oracle XE 11G Installer missing KEY_XE.reg file on both GUI and CLI installation types.

On both installation types (GUI/CLI), on Windows7 x64 operating system, XE 11G installer fail due to a missing KEY_XE.reg file.  Oracle XE 11G Installer (which is made for 32bit) is missing to extract that file (on a 64bit) and because of this the installation will fail.

In case of GUI installation please follow this link.

Continue reading

What is CACLS


cacls (Change Access Control Lists) is a command line utility for Microsoft Windows to change Access Control List (ACL) permissions on a directory, its subcontents, or files. An access control list is a list of permissions for securable object, such as a file or directory, that controls who can access it.

The cacls utility is considered an underpowered editor of permissions in Windows 2000 and later, lacking the ability to edit many of the specific settings available such as inherited ACEs. Microsoft has responded with newer utilities as xcacls.exe, xcacls.vbs, fileacl and icacls (Windows Vista), all of which offer improvements, but are still considered underpowered and in some case, potentially disruptive. Others, such as the SetACL team, have produced their own command-line and scriptable permissions editors.

Continue reading

Set permissions with CACLS independent on language

What is CACLS?

Some times you need to make a solution (script) for changing the permissions over a file; and, depending on case, you don’t need something fancy. For this you can use cacls.exe. So, let’s make an example of adding Full Control for EVERYONE group over a folder:

Continue reading

System Security Tips

Defend your system – Install an antivirus and an antispyware program.

This step has a big importance in defending your system, so choosing a good product to keep your files secure is the first step that you need to do. On the market there are a lot of antivirus and antispyware tools; most of them for a cost, but some of them are free to download and to use. You don’t need to think (always) that if a product is free than it is not good of it. There are a lot of free anti-virus/malware tools, around the web, but I will recommend some of them:

Windows Security Essentials
Staying secure in Windows 7 however, still requires users to be careful. If you upgrade to Windows 7, one of the first things I recommend most users do is to enable the UAC.

Windows 7 is not perfect by any means, if it were, anti-virus companies would go out of business, but it is a highly secure operating system. As long as UAC is enabled, and the system is kept patched, and safe computing is practised, the chance of getting infected is minimal. Running an anti-virus package will further decrease the likelihood, but as always, no system is 100% secure. Paragraph Source.

Another two good free antivirus software are: Malwarebytes’ Anti-Malware and SUPERAntiSpyware

Defend your system – Install a firewall.

Even your Windows Firewall is enabled, to have another firewall installed is not a bad thing. Bellow are two firewall software which are free and are are in top of the free firewalls.

Comodo Firewall (for 64bit also)
The Comodo firewall is easy to install without complex configuration issues, yet the multi-award winning software prevents malware from entering your computer and gives you control which application run on your PC using Default Deny Protection (DDP): If the Comodo firewall doesn’t recognize an application it assumes it to be hostile – a very effective way to deal with new unknown threats. Last but not least can the Comodo firewall send personalized alerts, and updates automatically. The Comodo Internet Security is definitively one of the best free PC security products available!

PC Tools Firewall Plus Free Edition
PC Tools Firewall Plus Free Edition comes with predefined firewall protection profiles based on location (e.g. home or public), automatic application blocking and comprehensive network shielding to keep hackers out of your system and malware at bay. Experienced users can create or edit advanced packet filtering rules; IPv6 support is also included since PC Tools’ Firewall Plus 6 for Windows.

Defend your system – Be carefully.

Regularly install updates for all your software—antivirus and antispyware programs, browsers (like Windows Internet Explorer), operating systems (like Windows), and word processing and other programs.

Use strong passwords and keep them secret. Don’t use the same password on all sites. If it is stolen, all the information it protects is at risk.

Don’t put an unknown flash (or thumb) drive into your PC. Or if you do, disable the flash drive auto-run by holding SHIFT key pressed while you insert the flash drive.

Be very cautious about opening attachments or clicking links in email or IM, or in posts on social networks (like Facebook)—even if you know the sender. Call to ask if a friend sent it; if not, delete it or close the IM window. Avoid clicking Agree, OK, or I accept in banner ads, in unexpected pop-up windows or warnings, on websites that may not seem legitimate, or in offers to remove spyware or viruses.

Only download software from websites you trust. Be cautious of “free” offers of music, games, videos, and the like. They are notorious for including malware in the download.

Windows 7 Tweaks

Open DOCX files without installing a converter (or Office 2007)

Unless you’ve updated your PC to Microsoft Office 2007 or Word 2007 (by no means a given, since earlier versions of Microsoft’s suite still work well for many folks), you might be confounded on occasion if you’re presented with a file with the DOCX extension. (DOCX is the native word-processing file format that the latest version of Word uses.)

Continue reading