What are these Commands??

I wanted to know what these commands are? and what are they used for?.
I have just started to learn PowerShell, so if you explain this to me in a simple language, it would be most appreciated.
  forfiles
  runas
  attrib
  icacls
Thank You.

You can get summary documantation by running these commands
forfiles.exe /? | more
attrib.exe /? | more
icacls.exe /? | more
But runas for some reason does not produce pipeline output when you run it that way
This command does produce help text for runas, but it is not redirectable.
I don't know why.
runas.exe
These are all executables of various windows vintages. They each output their "/?" help text using whatever I/O method their authors thought was appropriate. The fact that runas's output is not redirectable is because that is how it was coded - and it is
not clear if this was done on purpose. You can test this from a cmd.exe shell.
The point is that such executables are outside the control of Powershell. The fact that their help text coding is inconsistent is more the fault of cmd.exe for not having included a consistent help mechanism. But here's an even worse example - try this:
    notepad /?
this ugliness is because it is mostly the cmd.exe console based executables that honour the "/?" parameter. But they are not all bad - try this one:
    mstsc /?
The long and the short of it is this: if is not a native powershell command, good luck with getting help on it, and good luck getting it to work as you want it to from a powershell script.
I was going to say that you can use powershell's get-help cmdlet to determine if a command is native to powershell, but this is somewhat confused by the about_*.txt files, i.e.:
PS C:\Users\Al> get-help attrib.exe
Get-Help : Cannot find Help for topic "attrib.exe".
At line:1 char:10
+ get-help <<<< attrib.exe
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
PS C:\Users\Al> get-help attrib
TOPIC
about_Functions_CmdletBindingAttribute
SHORT DESCRIPTION
Describes an attribute that declares a function that acts similar to a
compiled cmdlet.
LONG DESCRIPTION
When you write functions, you can add the CmdletBinding attribute so that
Windows PowerShell will bind the parameters of the function in the same
way that it binds the parameters of compiled cmdlets. When this attribute
is declared, Windows PowerShell also sets the $PSCmdlet automatic variable.
When you use cmdlet binding, unknown parameters and positional arguments
that have no matching positional parameters cause parameter binding to
fail. Also, a function or script with cmdlet binding does not use the
$args variable.
Note: Compiled cmdlets use the required Cmdlet attribute, which is similar
to the CmdletBinding attribute that is described in this topic.
The following example shows the outline of a function that specifies all
the optional arguments of the CmdletBinding attribute. A brief description
of each argument follows this example.
[CmdletBinding(SupportsShouldProcess=<Boolean>,
ConfirmImpact=<String>,
DefaultParameterSetName=<String>)]
Param ($Parameter1)
Begin{}
Process{}
End{}
SupportsShouldProcess
When the SupportsShouldProcess argument is set to true, it indicates that
the function supports calls to the ShouldProcess method, which is used to
prompt the user for feedback before the function makes a change to the
system. When this argument is specified, the Confirm and WhatIf
parameters are enabled for the function.
For more information about confirmation requests, see "Requesting
Confirmation" in the MSDN (Microsoft Developer Network) library at
http://go.microsoft.com/fwlink/?LinkId=136658.
DefaultParameterSetName
The DefaultParameterSetName argument specifies the name of the parameter
set that Windows PowerShell will attempt to use when it cannot determine
which parameter set to use. You can avoid this issue by making the
unique parameter of each parameter set a mandatory parameter.
ConfirmImpact
The ConfirmImpact argument specifies when the action of the function
should be confirmed by a call to the ShouldProcess method. The call to
the ShouldProcess method displays a confirmation prompt only when the
ConfirmImpact argument is equal to or greater than the value of the
$ConfirmPreference preference variable. (The default value of the
argument is Medium.) Specify this argument only when the
SupportsShouldProcess argument is also specified.
SEE ALSO
about_Functions_Advanced
about_Functions_CmdletBindingAttribute
about_Functions_ParameterAttributes
PS C:\Users\Al>
appending .exe doesn't help, and leaving it off for attrib causes get-help to assume that you had typed
    get-help about_Functions_CmdletBindingAttribute
Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

Similar Messages

  • HT1343 What are these commands?

    What commands are to play/pause something? To stop something that's playing? To go to the next &amp; previous tracks? To navigate 1 space to the left/right in spaces? The space above/below?

    Safari browser and menu shortcuts:
    http://docs.info.apple.com/article.html?artnum=42951
    Mac OS X keyboard shortcuts:
    http://support.apple.com/kb/HT1343
    http://docs.info.apple.com/article.html?artnum=75459
    Changing behavious of Function Keys:
    http://support.apple.com/kb/HT3399?viewlocale=en_US
    and more useful information on keyboard shortcuts here:
    http://www.myfirstmac.com/index.php/mac/articles/mastering-keyboard-shortcuts

  • What are these processes and how do I prevent them?

    For many years, many have complained of external drives that are in standby/sleep spinning up for no apparent reason.  From the user's point of view this is unnecesssary, but to make matters worse, the system usually stops everything else while waiting for the drives.
    I have a Mac mini that I use as a home theater pc.  The media and backups are on a 5-bay enclosure (no RAID) attached by USB.  While watching a video, the unused drives will go into standby mode, which is good.  But then, with no user activity, they will spin up, freezing the video and everything else, which is not good.  As these are slow drives and spin up sequentially, this can take 10-20 seconds.  This may happen once or twice an hour, but sometimes more frequently.
    In looking into the causes, I have turned off time Machine (after putting these drives into the Privacy section for good measure).  I also prevented Spotlight and fsevents logging with the following:
    mdutil -i off /Volumes/<drive1> /Volumes/<drive2> . . .
    cd /Volumes/<drive1 and then repeat for other drives>
         rm -rf .fseventsd .Spotlight-*
         mkdir .fseventsd
         touch .fseventsd/no_log .metadata_never_index
    As far as I can tell this has worked to stop those processes from accessing the drives after they are mounted, but the problem persists.  To find out what else might be causing them to wake up:
    sudo fs_usage -w | grep -e Volumes/<drive1> -e /Volumes/<drive2> . . .
    and here is what I found last night (actually didn't use the -w last night, thus it is cut off):
    18:35:36  fsgetpath   /Volumes/XBMC         0.000026   SSDragHelper
    18:35:36  fsgetpath   /Volumes/Stuff        0.000006   SSDragHelper
    18:35:36  fsgetpath   /Volumes/DatOptic_3   0.000005   SSDragHelper
    18:35:36  fsgetpath   /Volumes/MacBackUp    0.000003   SSDragHelper
    18:36:15  fsgetpath   /Volumes/XBMC         0.000026   System Prefe
    18:36:15  fsgetpath   /Volumes/Stuff        0.000004   System Prefe
    18:36:15  fsgetpath   /Volumes/DatOptic_3   0.000003   System Prefe
    18:36:15  fsgetpath   /Volumes/MacBackUp    0.000003   System Prefe
    18:55:36  fsgetpath   /Volumes/XBMC         0.000034   GoogleSoftwa
    18:55:36  fsgetpath   /Volumes/Stuff        0.000004   GoogleSoftwa
    18:55:36  fsgetpath   /Volumes/DatOptic_3   0.000003   GoogleSoftwa
    18:55:36  fsgetpath   /Volumes/MacBackUp    0.000003   GoogleSoftwa
    After looking into the Google process, I was surprised to find the tentacles that Google puts into your system, and ripped every bit of it out that I could.  But I have no idea about what's going on with SSDragHelper and System Prefe (presumable System Preferences).  This must be OS X itself?  What are these processes doing, and is there any way to prevent them from accessing these disks in this way?

    Thanks for the reply Hen3ry.  Looks like you've done a lot of investigation.  For me, fs_usage entries accompanying spindown are not problems - I'm happy if the drives spin down.  My problem is the spinups.  But still, I don't think it is necessary to time the fs_usage entries with spinups.  If you grep for the drives you're concerned about, you will see any process that would potentially wake them up.
    Because my understanding is limited, I also am more concerned with the process/application that is accessing the drives than with the functions or commands they are sending.  And the values that are returned by those functions are way beyond what I can deal with.
    It's interesting that you've found a difference between your old and new drives.  Could you specify the enclosure and drives in each case?
    The StorageStatus app looks interesting; thanks for the tip.
    Here's a summary of what I've done so far, which I think is working.  I need a few more weeks to know for sure.
    How to prevent unwanted drive spin-ups
    If you are actively using the computer that the enclosure is attached to, nothing on God’s green earth will stop OS X from waking them up after some user action, even ones that seem to have nothing to do with the external drives.  But if you leave the computer alone while some application is running, like watching a movie or downloading a file, you have a fighting chance of coaxing OS X into leaving the uninvolved drives alone.
    If the drives are shared with any other computers over a network, eject them on those computers
    Otherwise, OS X (AppleFileServer) will poll them every 10 seconds.  This might not be bad if you want to just keep the drives spinning and the other computer stays awake.
    Third-party apps
    Make sure no apps are running that might access your drives.  Google runs some processes that do this (maybe I’m naïve, but I was so shocked I removed chrome and every other trace of Google from my Mac mini system). Another is iStat and any utility that monitors SMART status in the background.
    Don’t let Spotlight index or search the drives
    Spotlight is persistent, and it may be necessary to take a variety of steps to stop its various processes (mds, mdworker) from accessing the drives and waking them up.  In other words, kill it, drive a stake through its heart, then burn the body:
    In System Preferences > Spotlight, add the drives to the Privacy pane.
    Add a file called .metadata_never_index to the root of each drive (note the leading period).  The easiest way to do this is in Terminal
    touch /Volumes/<drive1>/.metadata_never_index
    Tell Spotlight AGAIN to keep away from the drive:
    mdutil -i off /Volumes/<drive1> /Volumes/<drive2> . . .
    Finally delete the Spotlight folder from the drive.
    rm -rf /Volumes/<drive1>.Spotlight-*
    Stop fseventsd from logging in the drive
    This is easy, just putting a no_log file in its folder.  I have found that rarely it still writes some files in there, but it doesn’t seem to do so when it causes problems, so . . .
              rm –rf /Volumes/<drive1>/.fseventsd/*
         touch /Volumes/<drive1>/.fseventsd/no_log
    Finder sidebar
    Some people say that if the drives show in the Sidebar of Finder windows, the Finder will be checking them.  I’m not sure. But to be safe, in Finder Preferences > Sidebar, uncheck External Disks.
    Just say no to Time Machine
    On the home theater mac itself, regular backups shouldn’t be needed.  You should be able to just turn Time Machine off.  However, it is probably sufficient to simply open System Preferences > Time Machine > Options and add the drives to the list of locations to exclude from backup.
    Second, local backups can be disabled with
    sudo tmutil disablelocal
    Look for other culprits
    If the problem persists, use fs_usage, which generates a real-time log of filesystem activity. There is so much going on that you need to use grep to restrict the output to entries that involve your drives. The entries that accompany your drive spin-ups are the ones you really want.
    sudo fs_usage -w | grep -e Volumes/<drive1> -e /Volumes/<drive2> . . .
    Now leave the keyboard and mouse alone, as many things you might do will cause the drives to be accessed. You probably want to find what does it when you’re not actively interacting with the computer.  It’s not really necessary to wait for your drives to sleep and see what wakes them.  Any activity you see would probably wake the drives if they were asleep.  When you see some activity and want to stop and examine, type Control-C to stop the output.  On the far right of each entry is the process or application that accessed the disks.
    I got pointers from http://system-log.tyr.org.uk/2012/01/31/how-to-stop-usb-drives-from-spinning-up- unnecessarily-on-os-x-lion/ and http://www.jackenhack.com/disk-that-refuses-to-sleep-in-mac-os-x-how-to-fix-it/

  • What are the commands using in SAP ECC 6.0 ehp on SYBASE Database? Backup and restore commands?

    Hi All,
    What are the commands using in SAP ECC 6.0 ehp on SYBASE Database? Backup and restore commands?

    Hi Jayachander,
    Have a look at these sap notes:
    For taking backup: Schedule from DB13 and get the exact command from Logs
    1841993 - SYB: How to schedule backups in DBA Cockpit
    1887068 - SYB: Using external backup and restore with SAP Sybase ASE
    How to restore DB
    1611715 - SYB: How to restore a Sybase ASE database server (Windows)
    Divyanshu

  • What are these ports 989, 1021, 1033 and why are they always ON?

    I have noticed unknown network traffic on Activity Monitor, even I close all application, AM still shows there's about 1~2 KB (Data received).
    So, I open a Terminal and check by 'netstat' command. I notice there's some unknown tcp connections established. Is there anyone know what are these ports, and is it normal to have them ON all the time ?
    $ netstat -n | grep EST
    (..omited)
    tcp4 0 0 127.0.0.1.1033 127.0.0.1.989 ESTABLISHED
    tcp4 0 0 127.0.0.1.989 127.0.0.1.1033 ESTABLISHED
    tcp4 0 0 127.0.0.1.1033 127.0.0.1.1021 ESTABLISHED
    tcp4 0 0 127.0.0.1.1021 127.0.0.1.1033 ESTABLISHED

    These ports are some of those used by the NetInfo subsystem which keeps track of your computer's users, groups, and some other information about its configuration. Since the IP addresses listed for those connections are all 127.0.0.1, your computer is connecting to itself; having these open isn't a cause for concern.
    (16141)

  • I have random excel files on my desktop that cannot be deleted. What are these and how can I trash them?

    I have random excel files on my desktop that cannot be deleted. What are these and how can I trash them?

    They appear as mounted DMG files.If you right click on them mdo they have an Eject entry?
    Have you set the OS to Show All Files with a terminal command? If so take that off for now.
    Look in your Home folder (Users/UserName) and then the Desktop subfolder under it. Do you see all these files/folders/drives?

  • What are the commands to add and enable signature of attacks in ASA?

    What are the commands to add and enable signature of attacks in ASA when testing in GNS3?
    or this function can only be tested by add virtual client such as window xp and install a software ASA ?
    if have commands, how to list the signatures available in command?
    how to test these functions by using penetration tools?

    Sir, Downloaded from HP Official Site 
    Type: BIOS Version: F.50 Rev. A(4 Aug 2014) Operating System(s): Microsoft Windows 7 Professional (64-bit) | File name: sp68040.exe (7.7 MB)
    My Laptop Model No. 4530s is not compatable for the following two options, then resort the last option.  Made bootable USB key with the help of Rufus application MS DOS option. When I reboot, some terminal type opened  to run commands.  Please help me the easiest and safest way for this model of Laptop
    This package includes several methods for updating the BIOS version as follows:
    - Use the HPQFlash Utility to update the BIOS directly in a Microsoft Windows Operating System environment.
    - Use System Software Manager (SSM) to update the system BIOS on PCs in a network.
    - Create a bootable USB Key to update the system BIOS.
    Thanks and Regards
    Enesbe

  • What are the commands available to read a file from application server and

    What are the commands available to read a file from application server and store the file into an internal table?

    Hi,
    To read a file from an Application Server to an Object there is a command in ABAP called <b>READ DATASET</b>. After that file is transported to that object you have to do a loop and put that data in an Internal Table.
    This statement exports data from the file specified in dset into the data object dobj. For dobj, variables with elementary data types and flat structures can be specified. In Unicode programs, dobj must be character-type if the file was opened as a text file.
    For dset, a character-type data object is expected - that is, an object that contains the platform-specific name of the file. The content is read from the file starting from the current file pointer. After the data transfer, the file pointer is positioned after the section that was read. Using the MAXIMUM LENGTH addition, the number of characters or bytes to be read from the file can be limited. Using ACTUAL LENGTH, the number of characters or bytes actually used can be determined.
    In a Unicode program, the file must be opened with an arbitrary access type; otherwise, an exception that cannot be handled will be triggered.
    If the file has not yet been opened in anon-Unicode program, it will be implicitly opened as a binary file for read access using the statement
    OPEN DATASET dset FOR INPUT IN BINARY MODE.
    . If a non-existing file is accessed, an exception that can be handled can be triggered.
    Influence of Access Type
    Files can be read independently of the access type. Whether data can be read or not depends solely on the position of the file pointer. If the latter is at the end of the file or after the file, no data can be read and sy-subrc will be set to 4.
    Influence of the Storage Type
    The import function will take place irrespective of the storage type in which the file was opened with the statement OPEN DATASET.
    If the file was opened as a text file or as a legacy text file, the data is normally read from the current position of the file pointer to the next end-of-line marking, and the file pointer is positioned after the end-of-line marking. If the data object dobj is too short for the number of read characters, the superfluous characters and bytes are cut off. If it is longer, it will be filled with blanks to the right.
    If the file was opened as a binary file or as a legacy-binary file, as much data is read that fits into the data object dobj. If the data object dobj is longer than the number of exported characters, it is filled with hexadecimal 0 on the right.
    If the specified storage type makes conversion necessary, this is executed before the assignment to the data object dobj. Afterwards, the read data is placed, byte by byte, into the data object.
    System Fields
    sy-subrc Meaning
    0 Data was read without reaching end of file.
    4 Data was read and the end of the file was reached or there was an attempt to read after the end of the file.
    Thanks,
    Samantak.
    <b>Rewards points for useful answers.</b>

  • What are these weird blue dashes?

    What are these weird blue dashes that got inserted into my Pages document since I closed it? They appear with each new paragraph start or break and I can't see how to get rid of them! ( I have OS 10.6.8 and Pages 4.1)

    Probably you used tabs to indent your paragraphs instead of using First Line Indent and you have Show Invisibles turned on:
    Menu > View > Hide Invisibles
    Peter

  • My company loaded profiles onto my iPad for email and calendars.. There is also a signing certificate and a certificate. What are these for? Additionally are they able to monitor apps and usage, ie Internet usage when it is not on their wifi?

    My company loaded profiles onto my iPad for email and calendars.. There is also a signing certificate and a certificate. What are these for?
    Additionally are they able to monitor apps and usage, ie Internet usage when it is not on their wifi?
    I do not have any VPN enabled?

    Do you happen to have an Android?  If so and depending on what version there is a great data usage analyse tool built-in.  See if you can go to Settings -> Data Usage  from there you can pick a current or previous billing cycle and then use the vertical sliders to select a date range and it will filter the usage data per app to show you exactly what app(s) were using data during that time frame.

  • What are these called?

    Hi,
    I am trying to figure out what this element is?  Since I dont know what its actually called I have to provide a picture for my example.
    What are these elements called?  I have pointed to them in my image with the red arrows.  Im pretty sure the horizontal ones are  a "horizontal rule".  But what about the vertical ones?  And how does one implement them in a site?  http://i52.photobucket.com/albums/g29/FartyMcFly/Example.jpg
    Thanks for any answers in advance and I apologize if its something stupidly simple.
    Thanks

    How do I set the length of the border lines.
    I'm afraid there is no support for that in current CSS2 standards.
    You will be able to do it with CSS3 border-images.  But not for a few more years.
    http://www.css3.info/preview/border-image/
    In the meantime, you could put your border on a neighboring division -- see example below:
    http://alt-web.com/TEMPLATES/CSS-Basic-2-column-layout.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • What are these dots on my iPhone 5 SIM tray?

    There are these odd white dots on my inside edge of the SIM tray in my iPhone 5. I don't recall seeing these dots in previous generations of iPhone 5.
    I found a similar thread on MacRumors about this, but there appears to be no answer.
    Here is a picture:
    For my iphone, I have an extra dot (so three dots and a line), so it is not exactly the same.
    What are these? Are these normal? Does your phone's SIM tray have those too? How many dots?

    How do you know about this? How many "configurations" are there  of these dots? This is the first time I had seen it in an iPhone (as compared to previous gens).

  • In preferences- saved passwords for Chrome://weave (Mozilla Services password) and Mozilla Services Encription Passphrase) what are these and are they needed?

    In preferences- saved passwords for Chrome://weave (Mozilla Services password) and Mozilla Services Encription Passphrase) what are these and are they needed?

    They are only needed for firefox sync.

  • What are these files for ACCFinderBundleLoader_64 and ACCFinderBundleLoader_32? They appear in my Launchpad!

    What are these files for ACCFinderBundleLoader_64 and ACCFinderBundleLoader_32? They appear in my Launchpad!
    I am thinking to delete them because they disturb me when they have a place in the Launchpad among my applications.

  • What are the commands in smartforms

    hi gurus
    can anyone suggest me
    what are the commands in smartforms
    thank you
    regards
    kals.

    Hi,
    Check the below link for complete information on smartforms
    [SMARTFORMS|http://sapabap.iespana.es/sapabap/manuales/pdf/smart.pdf]
    Regards,
    Chandru

Maybe you are looking for

  • How to install Oracle Lite ODBC driver without connecting the mobile server

    My Oracle Lite version is 10g R3. I am using branch office version application. I wanted to connect oracle client database(.odb file) via Lite DSN in a windows XP machine without installing the client in that device. Some of my users wanted to access

  • Intermittent  error when using the Disco Viewer client

    Hi, I have a user receiving the following intermittent error when using the Discoverer Viewer client: "The application encountered an invalid state. - Discoverer Beans XML Exception. Method: findNode Class: XMLUtils Error: Cannot find parent node. Pa

  • WF_STANDARD.block Problem

    Hi, I have created a custom workflow which has a BLOCK node which pauses the workflow until some external application completes. After external activity gets completed, wf_engine.completeactivity() is executed so as to resume the wokflow and complete

  • How do i type in squareroot

    I have an imac,how do i type in a squareroot symbol                                tom

  • Can't connect to internet on any device

    I have had my TC for almost 2 years without incident. Recently we have been having connectivity issues on all our devices (Macbook, iPhone, iPad). The green light on TC is on, and airport utility shows we are connected to wi-fi (on all devices), but