Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Windows Server 2008 Server Core : Detecting Shared Open Files with the OpenFiles Command

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
10/11/2012 6:25:46 PM
The OpenFiles command helps you track open shared files on any system of a network. This utility has a number of purposes, but the most important is to ensure that a system has no shared files open before shutting it down. Even though Windows performs an orderly shutdown on the server, the client may have data stored in a local cache that could get lost when the server shuts down. You could also use this utility to look for signs of unwanted intrusion (either locally or from a remote source). A shared file that you can't account for could indicate the activities of a cracker or a disgruntled employee. The OpenFiles utility has three modes of operation, DISCONNECT, QUERY, and LOCAL, which are discussed in the sections that follow.

1. Disconnect

This mode disconnects a user or closes a file. You can use this mode to force a closure. In some cases, you might find this necessary when an application terminates abnormally and leaves the file in an uncertain state. This mode uses the following syntax:

OPENFILES /Disconnect [/S system [/U username [/P [password]]]]
{[/ID id] [/A accessedby] [/O {Read | Read/Write | Write}]}
[/OP openfile]

The following list describes each of the command line arguments.

Always disconnect users or close files with care. Pursue every other possible means of disconnecting the user or closing the file before you use the DISCONNECT mode. Disconnecting users or closing files using this technique may corrupt the data file or cause the application to lose data because this method doesn't consider any of the data that appears in the application cache.



/S
system

Specifies the remote system that you want to check. In most cases, you'll also need to supply the /U and the /P command line switches when using this switch.


/U
[domain\]user

Specifies the username on the remote system. This name may not match the username on the local system. You'll need to supply a domain name when working with a domain controller.


/P
[password]

Specifies the password for the given user. You can provide the command line switch without specifying the password on the command line in cleartext. The system prompts you for the password. Using this feature can help you maintain the security of passwords used on your system.


/ID
id

Specifies the identifier of the file to disconnect. You may use the * wildcard to disconnect all currently shared files by identifier. Use the OPENFILES /Query mode to obtain the list of files currently open on the system, including the file identifier.


/A
username

Disconnects all files opened by a particular user as specified by username. You can use the * wildcard to disconnect all currently shared files by username. Use the OPENFILES /Query mode to obtain the list of files currently open on the system, including the username.


/O {Read | Read/Write | Write}

Closes all files opened in a particular mode. The valid values include read, read/write, and write. You can use the * wildcard to disconnect all currently shared files by open mode. Use the OPENFILES /Query /V mode to obtain the list of files currently open on the system, including the open mode. Note that the standard display doesn't include the open mode, so you must specify the /V command line switch.


/OP openfile

Disconnects all open file connections created by a particular open filename. You can use the * wildcard to disconnect all currently shared files by filename. Use the OPENFILES /Query mode to obtain the list of files currently open on the system, including the name of the open file.

2. Query

Use this mode to obtain a list of the files currently open on a system. This mode uses the following syntax:

OPENFILES /Query [/S system [/U username [/P [password]]]]
[/FO {TABLE | LIST | CSV}] [/NH] [/V]

The following list describes each of the command line arguments.


/S
system

Specifies the remote system that you want to check. In most cases, you'll also need to supply the /U and the /P command line switches when using this switch.


/U
[domain\]user

Specifies the username on the remote system. This name may not match the username on the local system. You'll need to supply a domain name when working with a domain controller.


/P
[password]

Specifies the password for the given user. You can provide the command line switch without specifying the password on the command line in cleartext. The system prompts you for the password. Using this feature can help you maintain the security of passwords used on your system.


/FO {TABLE | LIST | CSV}

Defines the output provided by the utility. The table format is normally the easiest to view on screen. The table columns define the values for output, while each row contains one driver entry. The CSV output provides the best method for preparing the data for entry in a database. Use redirection to output the CSV data to a file and then import it to your database. The list format provides one data element per line. Each group of data elements defines one driver. The utility separates each driver by one blank line. Some people find the list format more readable when working in verbose mode since the table format requires multiple lines for each entry (the lines wrap).


/NH

Forces the utility to display the data without a column header. You can only use this command line switch with the table and CSV formats. Omitting the header makes it easier to incorporate the data in a report or import it into a database.


/V

Displays detailed file information. The standard display includes the file identifier, accessed by information, file type, and filename complete with path. The extended information provided by this command line switch includes the hostname (server), number of locks, and the mode used to open the file (read, read/write, or write).

15.9.3. Local

This mode uses the following syntax:

OPENFILES /Local [{ ON | OFF }]

The following describes the command line argument.


{ ON | OFF }

Enables or disables the "maintain objects list" system global flag. The state of this flag determines whether the system tracks the state of local file handles. Enabling this flag adds overhead, which reduces performance, and also lets you track the status of shared files on your system. Calling the OPENFILES /Local mode without using this command line switch at all displays the current flag status, which is disabled on Windows systems.

Other -----------------
- Windows Server 2008 Server Core : Changing File and Directory Access with the ICACLS Command
- Windows Server 2008 R2 delta changes : High Availability and Recovery Changes, Security Changes, PowerShell Changes
- Windows Server 2008 R2 delta changes : Remote Desktop Services (Formerly Known as Terminal Services) Changes
- Windows Server 2008 R2 delta changes : File and Print Services Changes, Internet Information Server Changes, Hyper-V Changes
- SQL Server 2008 : Resource Governor overview, Classifier function
- SQL Server 2008 : Data Collector and MDW - Reporting
- Windows Server 2008 Server Core : Locating Information in Files with the Find and FindStr Utilities
- Windows Server 2008 Server Core : Finding Files and Directories with the Dir Command
- Microsoft Dynamics GP 2010 : Preventing posting errors by managing Batch dates
- Microsoft Dynamics GP 2010 : Getting control of Outlook features on the Home page, Reducing out-of-balance problems with Allow Account Entry
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server