Skip to main content

Posts

Showing posts with the label WMIC

How to insert landscape orientation in Word?

If you are writing a thesis, a report or an article that you need to insert a landscape layout in a specific page in Word document but your orientation all long is portrait and changing the orientation causes the whole layout to change.
Inserting landscape in a specific page in a word document can be done by inserting section breaks. Let’s just make a basic example.
Let’s say you have 3 page document and you want that first page in Portrait mode, second page in landscape and third page in portrait layout also.
First, click on “home” tab, click the “show/hide paragraph marks” option or see the icon below. Enabling this option the section breaks, spaces and tabs will be visible. But what we are interested is to see the “section breaks”.


In the first page position the cursor on the last area at the bottom of the page.
In Word 2010, click on “page layout” in the ribbon tab. Click on “breaks” and select “next page”. In the second page, position also the cursor at the middle or bottom of t…

PowerShell list printers of remote computers

How to print installed printers on remote computers?

With and PowerShell WMIC it can be don easily.

PowerShell command to list installed printers of a remote PC.

Invoke-command -ComputerName PC0100 -ScriptBlock { wmic printer get name}

Command above needs appropriate privileges to execute successfully and remote computers should be configured to accept remote WMIcommands.

Sample output:



WMIC Get IP Address

How to get IP Address via command line using WMIC?

Get IP Address of   remote computer.

Get IP Address using WMIC.

wmic nicconfig get IPAddress,ServiceName

Sample output:
IPAddress                                       ServiceName
                                                kdnic
{"169.254.0.241", "fe80::26d0:eff6:cc27:e1"}    VBoxNetAdp
{"192.168.11.6", "fe80::8798:acfe:6ee9:8b7c"}    athr
                                                L1C
                                                RFCOMM
                                                BthPan
                                                vwifimp
                                                tunnel
                                                RasSstp
                                                RasAgileVpn
                                                Rasl2tp
                                                PptpMiniport
                                                RasPppo…

Command line query service status

How to query windows service status using command line?
Sc.exe a command line tool for Windows operating system that every Windows admin should know. The Sys Admin is able to query, list, start or stop Windows services using this tool.

Sc.exe command line tool will help to query service status on local computer, remote computers or servers.
Example below shows the command line to query or list the services state that are running.
Query running services:
sc query | findstr /c:" RUNNING"  /c:"SERVICE_NAME"
Sample output:
SERVICE_NAME: AdobeARMservice
        STATE              : 4  RUNNING SERVICE_NAME: AntiVirSchedulerService
        STATE              : 4  RUNNING SERVICE_NAME: AntiVirService
        STATE              : 4  RUNNING SERVICE_NAME: AppHostSvc
        STATE              : 4  RUNNING SERVICE_NAME: Appinfo
        STATE              : 4  RUNNING SERVICE_NAME: AudioEndpointBuilder
        STATE              : 4  RUNNING SERVICE_NAME: Audiosrv
        STAT…

Enable ICMP or Ping request on Windows

If you ping a remote computer but fails, it could be that the firewall does not allow ICMP protocol.

Enabling ICMP or ping requests is quite useful for troubleshooting purposes but it could be also a security issue.
To enable ping or ICMP in Windows Firewall with Advance security, can be done via command line or using the graphical interface.
Command line is quite useful if the setting has to be done repeatedly or it has to be done on multiple machines.
Command line will also be helpful if a setting has to be enabled or disabled at times. Graphical interface is of course the easiest method if it has to be done one time but if the setting has to be done a couple of times then command line or scripting is definitely a good choice unless the person loves to click and click.
Enable Ping response using command line: netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
Disable Ping response using command line: net…

Lepide Active Directory Cleaner, a boon to enhance IT Security

Inactive user and computer accounts are considered as threats for IT security of an organization. These obsolete AD accounts can be easily used by hackers or uninvited users to access the organization’s network. Once their access is auto-authorized through the backdoor of an inactive user account, the hacker can steal the precious data stored on the server and/or will have the ability to crash down the Windows Server resulting in downtimes or permanent operation failure.

To be on the safe side, it is advised to track and disable or remove the inactive user and computer accounts. However, the Administrator will face a big challenge to do so in a large organization having thousands of users. It will be quite complicated to find out which user or computer account is inactive in a pool of thousand users.

If you are looking for a perfect solution, then Lepide Active Directory Cleaner is here with its tremendous feature set. It automatically scans the Active Directory to find out the user …