Home » Posts tagged 'Windows'

Tag Archives: Windows

WinX Menu

Starting with Windows 8 Microsoft has a replacement/alternative “start menu” that is accessible via the Windows+X key.
If the Windows+X, or right-click Start, does not work then check path to these files/folders/apps menu items at: %LOCALAPPDATA%\Microsoft\Windows\WinX
If that folder does not exist try copying it from another user’s home/profile path.

To restore the “Start” button and menu options you can try this one liner from an “Administrator Command Prompt”:

dism.exe /online /Cleanup-Image /StartComponentCleanup & dism /online /cleanup-image /restorehealth & sfc /scannow & pause

Microsoft NPS with Cisco Equipment Using RADIUS

See this article: Integrating Cisco devices CLI access with Microsoft NPS/RADIUS

Should be cheaper than Cisco’s ACS or ISE systems for small to medium 50-1000 user/computer  organizations.

Think about PCI/DSS (3.0) when analyzing cost/risk/liability/brand reputation.

Keyboard shortcuts for Windows

Windows system key combinations

  • F1: Help
  • CTRL+ESC: Open Start menu
  • ALT+TAB: Switch between open programs
  • ALT+F4: Quit program
  • SHIFT+DELETE: Delete item permanently
  • Windows Logo+L: Lock the computer (without using CTRL+ALT+DELETE)

Windows program key combinations

  • CTRL+C: Copy
  • CTRL+X: Cut
  • CTRL+V: Paste
  • CTRL+Z: Undo
  • CTRL+B: Bold
  • CTRL+U: Underline
  • CTRL+I: Italic

Mouse click/keyboard modifier combinations for shell objects

  • SHIFT+right click: Displays a shortcut menu containing alternative commands
  • SHIFT+double click: Runs the alternate default command (the second item on the menu)
  • ALT+double click: Displays properties
  • SHIFT+DELETE: Deletes an item immediately without placing it in the Recycle Bin

General keyboard-only commands

  • F1: Starts Windows Help
  • F10: Activates menu bar options
  • SHIFT+F10 Opens a shortcut menu for the selected item (this is the same as right-clicking an object
  • CTRL+ESC: Opens the Start menu (use the ARROW keys to select an item)
  • CTRL+ESC or ESC: Selects the Start button (press TAB to select the taskbar, or press SHIFT+F10 for a context menu)
  • CTRL+SHIFT+ESC: Opens Windows Task Manager
  • ALT+DOWN ARROW: Opens a drop-down list box
  • ALT+TAB: Switch to another running program (hold down the ALT key and then press the TAB key to view the task-switching window)
  • SHIFT: Press and hold down the SHIFT key while you insert a CD-ROM to bypass the automatic-run feature
  • ALT+SPACE: Displays the main window’s System menu (from the System menu, you can restore, move, resize, minimize, maximize, or close the window)
  • ALT+- (ALT+hyphen): Displays the Multiple Document Interface (MDI) child window’s System menu (from the MDI child window’s System menu, you can restore, move, resize, minimize, maximize, or close the child window)
  • CTRL+TAB: Switch to the next child window of a Multiple Document Interface (MDI) program
  • ALT+underlined letter in menu: Opens the menu
  • ALT+F4: Closes the current window
  • CTRL+F4: Closes the current Multiple Document Interface (MDI) window
  • ALT+F6: Switch between multiple windows in the same program (for example, when the Notepad Find dialog box is displayed, ALT+F6 switches between the Find dialog box and the main Notepad window)

Shell objects and general folder/Windows Explorer shortcuts

For a selected object:

  • F2: Rename object
  • F3: Find all files
  • CTRL+X: Cut
  • CTRL+C: Copy
  • CTRL+V: Paste
  • SHIFT+DELETE: Delete selection immediately, without moving the item to the Recycle Bin
  • ALT+ENTER: Open the properties for the selected object

To copy a file

Press and hold down the CTRL key while you drag the file to another folder.

To create a shortcut

Press and hold down CTRL+SHIFT while you drag a file to the desktop or a folder.

General folder/shortcut control

  • F4: Selects the Go To A Different Folder box and moves down the entries in the box (if the toolbar is active in Windows Explorer)
  • F5: Refreshes the current window.
  • F6: Moves among panes in Windows Explorer
  • CTRL+G: Opens the Go To Folder tool (in Windows 95 Windows Explorer only)
  • CTRL+Z: Undo the last command
  • CTRL+A: Select all the items in the current window
  • BACKSPACE: Switch to the parent folder
  • SHIFT+click+Close button: For folders, close the current folder plus all parent folders

Windows Explorer tree control

  • Numeric Keypad *: Expands everything under the current selection
  • Numeric Keypad +: Expands the current selection
  • Numeric Keypad -: Collapses the current selection.
  • RIGHT ARROW: Expands the current selection if it is not expanded, otherwise goes to the first child
  • LEFT ARROW: Collapses the current selection if it is expanded, otherwise goes to the parent

Properties control

  • CTRL+TAB/CTRL+SHIFT+TAB: Move through the property tabs

Accessibility shortcuts

  • Press SHIFT five times: Toggles StickyKeys on and off
  • Press down and hold the right SHIFT key for eight seconds: Toggles FilterKeys on and off
  • Press down and hold the NUM LOCK key for five seconds: Toggles ToggleKeys on and off
  • Left ALT+left SHIFT+NUM LOCK: Toggles MouseKeys on and off
  • Left ALT+left SHIFT+PRINT SCREEN: Toggles high contrast on and off

Microsoft Natural Keyboard keys

  • Windows Logo: Start menu
  • Windows Logo+R: Run dialog box
  • Windows Logo+M: Minimize all
  • SHIFT+Windows Logo+M: Undo minimize all
  • Windows Logo+F1: Help
  • Windows Logo+E: Windows Explorer
  • Windows Logo+F: Find files or folders
  • Windows Logo+D: Minimizes all open windows and displays the desktop
  • CTRL+Windows Logo+F: Find computer
  • CTRL+Windows Logo+TAB: Moves focus from Start, to the Quick Launch toolbar, to the system tray (use RIGHT ARROW or LEFT ARROW to move focus to items on the Quick Launch toolbar and the system tray)
  • Windows Logo+TAB: Cycle through taskbar buttons
  • Windows Logo+Break: System Properties dialog box
  • Application key: Displays a shortcut menu for the selected item

Microsoft Natural Keyboard with IntelliType software installed

  • Windows Logo+L: Log off Windows
  • Windows Logo+P: Starts Print Manager
  • Windows Logo+C: Opens Control Panel
  • Windows Logo+V: Starts Clipboard
  • Windows Logo+K: Opens Keyboard Properties dialog box
  • Windows Logo+I: Opens Mouse Properties dialog box
  • Windows Logo+A: Starts Accessibility Options (if installed)
  • Windows Logo+SPACEBAR: Displays the list of Microsoft IntelliType shortcut keys
  • Windows Logo+S: Toggles CAPS LOCK on and off

Dialog box keyboard commands

  • TAB: Move to the next control in the dialog box
  • SHIFT+TAB: Move to the previous control in the dialog box
  • SPACEBAR: If the current control is a button, this clicks the button. If the current control is a check box, this toggles the check box. If the current control is an option, this selects the option.
  • ENTER: Equivalent to clicking the selected button (the button with the outline)
  • ESC: Equivalent to clicking the Cancel button
  • ALT+underlined letter in dialog box item: Move to the corresponding item

Examples of AD from the Command-line

User Information
Find DN of Currently Logged On User

Paste code as is:

dsquery * domainroot -filter “(samAccountName=%USERNAME%)”

Find User With Primary Email Address

Retrieve user object matching given address as primary SMTP e-mail.

Syntax:

dsquery * domainroot -filter “(&(objectClass=User) (mail=))” -l -d -attr *

Example:

dsquery * domainroot -filter “(&(objectClass=User) (mail=John.Doe@mydom.com))” -l -d mydom.local -attr *

Find User With Any Email Address

Retrieve user object matching any assigned e-mail address.

Syntax:

dsquery * domainroot -filter “(&(objectClass=User) (proxyAddresses=**))” -l -d -attr *

Example:

dsquery * domainroot -filter “(&(objectClass=User) (proxyAddresses=*John.Doe@mydom.com*))” -l -d mydom.local -attr *

Find Email of User when DN is Known

Retrieve user object matching given DN and show primary SMTP e-mail address.

Syntax:

dsquery * domainroot -filter “(distinguishedName=)” -d -l -attr mail

Example:

dsquery * domainroot -filter “(distinguishedName=CN=Kerekes\, Charlie,OU=Knoxville,DC=mydom,DC=local)” -d mydom.local -l -attr mail

Find Hidden GAL Recipients

Retrieve all user objects that are hidden from the Global Address List in Exchange.

Syntax:

dsquery * domainroot -filter “(&(objectClass=User) (msExchHideFromAddressLists=TRUE))” -l -d -attr displayName

Example:

dsquery * domainroot -filter “(&(objectClass=User) (msExchHideFromAddressLists=TRUE))” -l -d mydom.local -attr displayName

Users With Password Set to Never Expire

Retrieve list of users with the “Password never expires” attribute set.

Syntax:

dsquery * domainroot -filter “(&(objectClass=user) (userAccountControl>=65536))” -attr sAMAccountName userPrincipalName userAccountControl -d

Example:

dsquery * domainroot -filter “(&(objectClass=user) (userAccountControl>=65536))” -attr sAMAccountName userPrincipalName userAccountControl -d mydom.local

Group Information
List Members of a Group

Querying AD for group membership is a multi-step process. The reason is that AD stores group membership in two places. The first place is the most obvious—in the member attribute of the group object. The second is not as obvious—as an integer value in the primaryGroupID attribute of user objects.

For most scenarios, querying the member attribute of group objects will provide a complete list of members. However, if the group in question is set as a default group for any user object, that user will not be listed in the member attribute.

Query the Group’s “Member” Attribute

The sample below lists all members stored in the member attribute of the group. If this query is not showing all members, you will need to perform the queries in the next section as well.

Syntax:

dsquery * domainroot -filter “(&(objectClass=group)(name=))” -l -d -attr member

Example:

dsquery * domainroot -filter “(&(objectClass=group)(name=Help Desk Associates))” -l -d mydom.local -attr member

Query the User’s “primaryGroupID” Attribute

First, we determine the primary group ID for the group in question. We do this by finding the SID of the group object; the last segment of the SID is used as the primary group ID.

Syntax:

dsquery * domainroot -filter “(&(objectClass=group)(name=))” -l -d -attr objectSid

Example:

dsquery * domainroot -filter “(&(objectClass=group)(name=Help Desk Associates))” -l -d mydom.local -attr objectSid

The above query will produce an output similar to this:

S-1-5-21-123456789-1234567890-9876543211-1169

Now we are ready to find all user objects that have the above group set as their default.

Syntax:

dsquery * domainroot -filter “(&(objectClass=user)(primaryGroupID=))” -l -d -attr cn

Example:

dsquery * domainroot -filter “(&(objectClass=user)(primaryGroupID=1169))” -l -d mydom.local -attr cn

List Group Members with Additional User Attributes

If we want more than the DN of group members, we need to use a FOR statement to first generate the list of members, then query each member object for the desired attributes.

Please be aware that the example below queries only the member attribute of the group and will miss any user objects with this group as their default. See the above section for details about the primaryGroupID attribute.

Syntax:

for /F “delims=*” %i IN (‘dsquery * domainroot -filter “(&(objectClass=group)(name=))” -l -d -attr member’) DO @dsquery * domainroot -filter “(distinguishedName=%i)” -attr


Example:

for /F “delims=*” %i IN (‘dsquery * domainroot -filter “(&(objectClass=group)(name=Help Desk Associates))” -l -d mydom.local -attr member’) DO @dsquery * domainroot -filter “(distinguishedName=%i)” -attr displayName samAccountName mail

Computer Information
List All Computer Objects

Syntax:

dsquery * domainroot -filter “(objectClass=Computer)” -attr name -l -d

Example:

dsquery * domainroot -filter “(objectClass=Computer)” -attr name -l -d mydom.local

List Computer Objects in a Specific OU

This example lists all computer objects stored in the mydom.local/Servers/Exchange OU.

Syntax:

dsquery * “” -filter “(objectClass=Computer)” -attr name -l -d

Example:

dsquery * “ou=Exchange,ou=Servers,dc=mydom,dc=local” -filter “(objectClass=Computer)” -attr name -l -d mydom.local

List All Domain Controllers

Syntax:

dsquery * “ou=domain controllers,

” -filter “(objectClass=Computer)” -attr name -l -d


Example:

dsquery * “ou=domain controllers,dc=mydom,dc=local” -filter “(objectClass=Computer)” -attr name -l -d mydom.local

Find DN of Computer Object in Current Domain

The DN contains the full directory path of the computer object and can be helpful in locating the computer using the GUI tools in a complex AD structure.

Syntax:

dsquery * domainroot -filter “(&(objectClass=Computer) (name=))”

Example:

dsquery * domainroot -filter “(&(objectClass=Computer) (name=exch19))”

Disable Driver Signing in Windows 7

I have not tried this in Win7x64, but in Win7 32-bit (x86) it works to disable the signed driver requirements in Windows 7.

bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
bcdedit.exe -set TESTSIGNING ON

Please note that changing Driver Sign may be a security risk. I in no way endorse or recommend that this should be used by anyone who does not understand the risks involved.

Outlook 2007 Command-line Switches

What are commands and switches?

Each time you start the program, you run the outlook.exe command, although you do not usually type the command or even see it. You can change certain aspects of how the program starts by adding subcommands called switches to the outlook.exe command. (more…)

Windows7 is working great…

Windows7 is working GREAT from my install. The corporate IT deploy image is horrible and starting to give win7 a bad name in our org. #win7

Unhappy with current Win7 image…

very unhappy with current Win7 Enterprise image! need to build image and show IT how a corporate deployment image is supposed to work. #win7

Exchange 2007 PowerShell DistributionGroup commands

Here aresome PowerShell cmdlets for working with distribution group in exchange 2007

Get-DistributionGroup – Retrieves properties of a distribution group

New-DistributionGroup – Creates a new distribution group

Remove-DistributionGroup – Deletes a distribution group

Set-DistributionGroup –  Set Properties on a distribution group

(more…)

How To Create New Exchange 2007 Contacts


You can create (aka import) email contacts in Exchange 2007 from the command line using PowerShell (the Exchange Console). The PS script will read the contact information from a CSV file.

Here is the powershell (Exchange Console) script/command:

Import-Csv contacts.csv | ForEach { New-MailContact -Name $_.displayName -ExternalEmailAddress $_.Emailaddress -OrganizationalUnit "domain.com/company/email/contacts" }

NOTE: be sure to adjust the -OrganizationalUnit parameter in the command above.

CSV file: (contacts.csv)

displayName,Emailaddress
Mike Wood,michael@example.com
John Q. Customer,johnc@example.org
etc,etc@example.net

DOS variables: %date% and %time%

Need to do some date and/or time manipulation in a DOS batch/command file? Here is a good example:

set filedatetime=%date:~10%-%date:~4,2%-%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%
echo %filedatetime% 2009-01-28_15120393

Hope this helps you with your batch files.

Error Starting Outlook 2007

Error: “Cannot start Microsoft Office Outlook. Cannot open the Outlook window.”

Fix: Orb/Start -> run… -> Outlook.exe /resetnavpane

VBScript to Verify Digitally Signed File

MSDN article

The following sample VBScript code will verify a Signed file:


Dim Signer, File, ShowUI, FileOK
Set Signer = CreateObject("Scripting.Signer")
File = "c:\newfile.wsf"
ShowUI = True
FileOK = Signer.VerifyFile(File, ShowUI)
If FileOK Then
WScript.Echo File & " is trusted."
Else
WScript.Echo File & " is NOT trusted."
End If

VBS to Validate Signed Code

MSDN article

The following sample VBScript code will verify a Signed file:


Dim Signer, File, ShowUI, FileOK
Set Signer = CreateObject("Scripting.Signer")
File = "c:\newfile.wsf"
ShowUI = True
FileOK = Signer.VerifyFile(File, ShowUI)
If FileOK Then
WScript.Echo File & " is trusted."
Else
WScript.Echo File & " is NOT trusted."
End If

Copy iPhone’s iTunes Library to Windows

Use Winamp Media Player and the ml_ipod plugin to copy music, video and audio books from an iPod or iPhone to a Windows computer.

Use these two free programs to regain access to the music saved on an Apple multimedia device.  In short: copy your iPod/iPhone iTunes stuff to your hard drive!

The processes and programs discussed in this article do NOT remove any Digital Rights Management (DRM) or copy protection from the media files.  This is simply for copying the files as is from the device to a computer hard drive. The protected and unprotected files are copied without modification.

(more…)