NAC Custom Check to run command

hi,
i have a case where i want to check whether the computer has join the microsoft domain or not.
after searching, i found the effective way is to run command nltest.exe. nltest.exe is a command to check trust relationship between workstation and domain controller.
is there any way that custom check can do this ? in CAM document, only registry, file, service, and application check.
this is the link from Microsoft : http://support.microsoft.com/kb/158148
example:
C:\>nltest /server:test3 /sc_query:testd
Flags: 0
Connection Status = 0 0x0 NERR_Success
Trusted DC Name \\TEST2
Trusted DC Connection Status Status = 0 0x0 NERR_Success
The command completed successfully
Can Clean access agent do the command line check and interpret the result ?
thanks,
yd

The Cisco NAC Agent will not able to run and interpret the command output.
If the goal is to check whether the computer is a member of a known domain, you can check 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Domain' to contain the name of the domain.
-Dan

Similar Messages

  • Issue with calling custom function in merge command -10g

    Hi,
    I have ran into issue while calling a custom function in merge command.
    It throws error 'Invalid identifier'. Oracle doesnt understand that it is a function and take the function name as column name.
    Since no such collumn name exists, it throws 'Invalid identifier'.
    Interestingly, merge command works fine when it has a oracle function (replace, decode).
    The oracle version is 10.2.0.3
    It is very urgent.
    Any pointers will be helpful.
    Regards,
    Ravi

    I don't have privileges to create dblink, but this is working for me.
    So, i don't think function can be a issue here.
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:01.02
    satyaki>
    satyaki>
    satyaki>create table hist_tab
      2     as
      3       select * from emp
      4       where sal between 2000 and 4000;
    Table created.
    Elapsed: 00:00:00.09
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>update hist_tab
      2     set mgr = 7794;
    1 row updated.
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>commit;
    Commit complete.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7794 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>create table tran_tab
      2     as
      3       select * from emp
      4       where sal between 2000 and 7000;
    Table created.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select * from tran_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
          7902 FORD       ANALYST         7566 03-DEC-81    5270.76                    20 ANALYST
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>ed
    Wrote file afiedt.buf
      1  create or replace function fun(c_in number)
      2     return number
      3     is
      4       c_out number(4);
      5     begin
      6       if c_in < 7900 then
      7          c_out := 0;
      8       else
      9         c_out := 1;
    10       end if;
    11       return c_out;
    12*    end;
    13  /
    Function created.
    Elapsed: 00:00:01.00
    satyaki>
    satyaki>merge into hist_tab o
      2  using (
      3     select empno,
      4            ename,
      5            job,
      6            mgr,
      7            hiredate,
      8            sal,
      9            comm,
    10            deptno,
    11            job1,
    12            dob
    13     from (
    14              select k.*,
    15                     rank() over(order by fun(k.empno)) rn
    16              from tran_tab k
    17          )
    18     where rn = 1
    19     ) n
    20  on ( o.empno = n.empno)
    21  when matched then
    22    update set o.ename = n.ename,
    23               o.job = n.job,
    24               o.mgr = n.mgr,
    25               o.hiredate = n.hiredate,
    26               o.sal = n.sal,
    27               o.comm = n.comm,
    28               o.deptno = n.deptno,
    29               o.job1 = n.job1,
    30               o.dob = n.dob
    31  when not matched then
    32    insert(
    33            o.empno,
    34            o.ename,
    35            o.job,
    36            o.mgr,
    37            o.hiredate,
    38            o.sal,
    39            o.comm,
    40            o.deptno,
    41            o.job1,
    42            o.dob
    43          )
    44    values(
    45            n.empno,
    46            n.ename,
    47            n.job,
    48            n.mgr,
    49            n.hiredate,
    50            n.sal,
    51            n.comm,
    52            n.deptno,
    53            n.job1,
    54            n.dob
    55          );
    1 row merged.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>select * from hist_tab;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO JOB1      DOB
          7844 TURNER     SALESMAN        7698 08-SEP-81       2178          0         30 SALESMAN
    Elapsed: 00:00:00.00
    satyaki>You can check the final output with old output. It is working perfectly - i guess.
    Regards.
    Satyaki De.

  • Customer Check Returns

    Hi Team,
    When Customer checks bounce in Bank statement we see two entries.
    In Bank statement First, Credit amount, and with the same amount Debit.  and Bank Charges.
    Now my question, Is there any standard process to track in SAP.
    Like Example if we want to get check deposit we will run the FF68. Similarly I am looking for Check Bounce case
    Check Deposit: (FF68)
             Check Deposit A/c 100 Dr
                   To Customer Cr
    Thank you
    Anil

    Hi Ajeesh,
    Thanks for reply,  as your links shows me stock return, But I am looking for Customer Payment receipt.
    If cutomer give payment mode as check(cheque), while realize check if check bounce. what is the SAP Standard Process
    Here I need to revers the posting with check voide reason. how we can map in SAP
    Thank you
    Anil

  • Using computer variables in task sequence "Run Command Line"

    I am attempting to deploy VMs through VMware's vRealize Automation tool using CM. The process creates a CM computer object then creates a direct rule on a CM collection for the new computer object. During the creation of the computer object vRA creates computer
    variables provided by me on the computer object. I see the computer object built and i see the custom variables on the computer object:
    Name Value
    dns1 10.10.10.10
    dns2 10.10.10.11
    gateway 10.10.10.1
    ipAddress 10.10.10.2
    netMask 255.255.255.0
    In the task sequence the last step is to "Run Command Line":
    cmd /c netsh int ip set address name="Ethernet0" static %ipAddress% %netMask% %gateway% & cmd /c netsh int ip set dns name="Ethernet0" static %dns1% & cmd /c netsh int ip set dns name="Ethernet0" static %dns2% index=2
    When the TS gets to that step it doesn't substitute the variables in the command with the computer variables listed above. Looking at the smsts logs after the deployment is complete I see lines stating:
    Set Command Line:...
    Start executing command line:...
    Executing command line:...
    ProgramName = ...
    All of those lines show the command exactly as it is above with the %variables% intact.
    The command immediately fails with the error:
    Invalid address parameter (%ipAddress%). It should be a valid IPv4 address.
    Does anyone have a suggestion on why the TS isn't using the variables? I found this article https://technet.microsoft.com/en-us/library/bb693541.aspx but its for 2007 not 2012. I wasn't able to find something comparable for 2012.

    I don't know why anyone here thinks you *need* sccm osd to achieve fully automated customizations.
    Customer selects base image (2008 r2 core, 2008r2 gui, 2012 r2 core, 2012 r2 gui), which should be thin and with zero customizations anyway,
    vaai accelerated clone creates vm,
    ip addr/gateway/dns config is injected with powercli,
    customers config management engine agent of choice is installed via powercli script injection/execution (we have puppet users, ConfigMgr users, saltstack users, IEM users, Cheff users),
    the clone completes in ~2 minutes and a VM is presented to the customer in less than 5 minutes 
    Deploying windows VMs via SCCM OSD is not only slow, but requires dev work on the customer side to get things rolling which wastes everyone's cycles including your own

  • Run Command through Java Program.

    I am giving ping command in exec method of Runtime().
    But ping syntax is different for linux and windows. So when I run command on windows it wasn't worked. I am giving command --> ping -c5 ipaddress . This works fine for linux but in windows, there is no -c option. So is there any solution to overcome this situation?
    please reply ASAP.
    Thanks,
    Raj

    I am writing code that runs ping command on all OS.
    Ping syntax different for different OS (like
    windows,linux,solaris etc).
    I don't want to check for each OS and run command
    specific to that OS.
    I want to write a generic program so ping command
    execute regardless of which OS. This is self-contradictory. You can't use one command line string on different platforms if they don't support this one command string.
    The ping command is different (concretely, this -c option you mention is indeed not supported on Windows - what does it do anyway?) on different OS.
    So, you basically have two options:
    - You use only a subset of the ping options, one that does run on all your platforms (I actually expect ping to be pretty portable anyway but...).
    - Or you do use platform specific options like -c, in which case there's no way around checking the running OS and generating a specific command line.
    Can I use system calls in my program to execute the
    ping command, If yes, how?Rephrase please.

  • Custom keybinding for shell command in emacs

    Hello all,
    I am a very frequent LaTeX user, and I often have BibTeX references and pstricks images, so I end up compiling my document several times for every document. To speed up this process, I wrote a short, simple shell script (below)
    #!/bin/sh
    file="$1"
    latex \\nonstopmode\\input $file.tex
    bibtex $file
    latex \\nonstopmode\\input $file.tex
    latex \\nonstopmode\\input $file.tex
    dvips $file.dvi
    ps2pdf $file.ps
    This has been much nicer, since instead of typing all of those things, I simply type "mytex file."
    Being the greedy person that I am, I would now like to compile it from emacs without typing the shell command, kind of like C-c C-f when I am just compiling as usual. I don't have very much experience with custom keybindings in emacs anyway, but I certaintly do not know how to call a particular shell command including the current file name.
    Any tips?
    Last edited by keither (2010-02-15 15:18:42)

    First of all, you will probably save some compilation time by using an "inteligent" script such as latexmk. You should look into it if you have not done so already.
    Second of all, AUCTeX will also suggest the "correct" next step when using C-c C-c. Also, you should consider just adding latexmk or your own script to the C-c C-c cycle. Here are some examples from my .emacs
    (eval-after-load "tex"
    '(progn
    (add-to-list 'TeX-command-list
    (list "View in Acrobat Reader" "acroread %o"
    'TeX-run-command nil t))
    (add-to-list 'TeX-command-list
    (list "Count Words" "texcount -inc %s.tex"
    'TeX-run-command nil t))
    (add-to-list 'TeX-command-list
    '("Synctex" "/home/rasmus/.scripts/synctex-emacs %t %b %n" TeX-run-TeX nil t) t)
    If you want to use a script as the one suggested by yourself you would want to look into the last exampe ("Synctex").
    --Rasmus

  • How to "telnet" and run commands on another computer?

    I have a Unix program. I need this to "telnet" to a Windows computer and run commands (via the prompt in Windows). Is there a way to do this in java?
    Also it is something that will be a cron job so the password will be stored in a file rather than the user typing it at the screen. There is no GUI. There is no server or java process running on Windows at the time. The Unix program needs to connect to Windows only when needed.

    Try enabling the Windows telnet server, use a regular telnet client and check if it is enough for your needs.
    Several commands in Windows apparently could be run in command-line mode using telnet, but for some reason they don't work very well. For instance, they could be using some special console-mode APIs for hiding the cursor or drawing characters in different colors, that simply will not be echoed by the telnet server.
    I remember when I've tried to use the osql tool (a command-line interface) of MS SQL Server in a Windows telnet server session. Some things simply didn't work.

  • Sh run command is showing high cpu / ssh process

    HI
    When we execute sh run command on 45xx or 65xx switch , cpu spike momentarily to >85 & ssh process is taking most of the cpu cycle
    This is normal how IOS behave or something we need to check
    4500#sh processes cpu sorted | exc 0.00
    CPU utilization for five seconds: 88%/1%; one minute: 41%; five minutes: 36%
    PID Runtime(ms)   Invoked     uSecs   5Sec   1Min   5Min TTY Process
    146       4136       871       4748 59.27% 6.05% 1.30%   1 SSH Process    
    48 16866873922152633381         0 14.55% 14.98% 15.01%   0 Cat4k Mgmt HiPri
    103 16552592322880818592         0 6.31% 6.57% 6.59%   0 Spanning Tree  
    6500#sh processes cpu sorted | exc 0.00
    CPU utilization for five seconds: 82%/6%; one minute: 17%; five minutes: 9%
    PID Runtime(ms)   Invoked     uSecs   5Sec   1Min   5Min TTY Process
    66       7408     4713       1571 70.47% 9.15% 1.95%   1 SSH Process    
    273   2680382442700124902         0 1.67% 1.13% 1.02%   0 IP Input        
    267   176292656 43570676       4046 1.27% 1.09% 1.09%   0 CDP Protocol    
    12   56465396 138235369       408 0.47% 0.35% 0.32%   0 ARP Input    
    Br/Subhojit 

    HI,
    Our config size is bit high
    Apart from the time, when we run the command CPU is low
    Is there any way to put some command to fine tune the same
    Find 1 command, but not sure about the Impact, Pls suggest
    parser config cache interface
    Br/Subhojit

  • Custom check in dialog

    Hi,
    we are currently implementing a custom check-in dialog for Bridge.
    The dialog contains a Combobox.
    The available items in the combobox are loaded from a web-service, called from Bridge. How is it possible to provide the Flex UI with data from Bridge?
    Thanks

    I think I'm on the right track but I'm not able to get it working.
    I'm using the IGetCustomCheckInUIContextInfoHandler from the Drive SDK, and have added following testcode:
    HashMap<String, Object> items = new HashMap<String, Object>();
    items.put("key1", "value1");
    items.put("key2", "value2");
    response.setContextInfo(items);
    In the Flex Mdule, I have implemented ICustomCheckInUI and using following code:
    public function setContextInfo(info:Object):void
    var items:Array = info as Array; 
    if(items != null) {workflowCombo.dataProvider = items;
    When running, I am able to see the ComboBox, but it is empty. Anyone an idea?

  • SSH SUDO passwordless to run commands on remote server

    Hi Experts,
    We are running various OS/Network and Database related commands and scripts on Local and Remote Server to perform/compare the results
    As part of this activity, we have bottleneck on running commands/scripts on the remote server as we need to provide password everytime whenever we use SSH command
    Also, we need to run command as ssh sudo su - oracle for security purpose which prompts password two times.
    we would like to automate this process in order to save password securely(temporarily) while running ssh sudo commands/scripts.
    I see, there are various solutions using SSHPASS,EXPECT commands, however we dont have anything available to use within our group.
    We may not be able to use SSHPASS as this component not installed during VM build, so we left with only option to use EXPECT.
    So, Need your help to get any example working script using EXPECT for ssh sudo passwordless connection.
    Appreciate if anybody can share ideas or working scripts
    Thanks in advance

    FWIW, here is a small script that I wrote several years ago that may help you to automate the password less ssh setup with a remote system. I just verified it and changed it to create a RSA key. The script still works and runs fine under Oracle Linux and Mac OS X.
    Simply create a script called "passwordless-ssh" with the content shown below.
    Assign execute privileges: chmod u+x passwordless-ssh
    Then run the script as following:
    ./passwordless-ssh user@target_hostname_or_ip
    The script will create a ssh RSA private and public key, prompt for the remote host password and the copy the pubic key to the remote host. A subsequent ssh login to the remote host should no longer prompt for the password. It is essential however that the scrips runs in an interactive session, which is verified.
    #!/bin/bash
    # Creating SSH public RSA key if non exist and copying it to remote target
    # for passwordless SSH login.
    # Author: Catch 22, Oracle OTN, 28-APR-2015
    # Arguments: $1 (ssh login to remote target)
    ME=passwordless-ssh
    LOGFILE="/tmp/$ME.log"
    f-mode()
    # Check if session is interactive (terminal) or non-interactive (UDEV).
    # Output: 0 = interactive, 1 = non-interactive
       [[ -t 0 || -p /dev/stdin ]] && return 0 || return 1
    f-log()
    # Display messages in interactive mode, or write output to syslog
    # (/var/log/messages) when in non-interactive mode. Write the messages
    # to a logfile if the syslog logger interface command is not available.
    # Input: $1 = text
       if f-mode; then
          echo "$ME: $1"
       elif hash logger; then
          logger "$ME: $1"
       else
          echo "$ME:`date`: [logger] Cannot execute, aborting" >> $LOGFILE
          echo "$ME:`date`: $1" >> $LOGFILE
       fi     
    # Exit and show error if current session is not interactive.
    [ ! f-mode ] && f-log "[session] non-interactive, aborting" && exit 1
    keyfile="$HOME/.ssh/id_rsa"
    [ -z "$1" ] && echo "Missing 'user@target_host' argument. Aborted." && exit 1
    if [ ! -f $keyfile ]; then
       mkdir -p $HOME/.ssh
       ssh-keygen -t rsa -f $keyfile -N ''
    fi
    keycode=`cat $keyfile.pub`
    remote_cmd2="echo "$keycode" >> $remote_ssh_file; chmod 644 $remote_ssh_file;"
    remote_ssh_dir="~/.ssh"
    remote_ssh_file="$remote_ssh_dir/authorized_keys"
    ssh -q $1 "mkdir -p $remote_ssh_dir; chmod 700 $remote_ssh_dir
    echo "$keycode" >> $remote_ssh_file; chmod 644 $remote_ssh_file"
    unset ME LOGFILE keyfile keycode remote_ssh_dir remote_ssh_file
    #END

  • Running Commands post Image Deployment in Other Tool

    Hi, I am using Matrix42 which is a tool from Empirum to deploy Windows7. It does not give me options  to run scripts at desired stages as OSD/MDT does. I need to configure some settings at the end of Win7 deployment. Is there a way to automatically
    achieve this?

    As suggested by Paul, you can use GPO, UNATTEND.XML etc. One more way to achieve running desired commands post OS installation is to use SetupComplete.cmd file.
    You will have to add your scripts to it as you would do in a batch file with certain delay added if there are multiple commands you wish to run.
    This should be present at the following location and you can capture your WIM with it present there:
    C:\Windows\Setup\scripts\SetupComplete.cmd
    For more information, check the following link:
    http://www.tech-recipes.com/rx/21558/how-to-run-commands-after-windows-7-deployment-using-setupcomplete-cmd/
    -RG
    If this thread answered your question, Please click on "Mark as Answer".

  • Running commands on a remote UNIX machine

    I am very new to Java. Just wanted to get that out of the way. :)
    I have installed Websphere Application Developer and Websphere Application Server on my Windows 2000 PC and intend to use this machine to host some things I will create.
    One of the main things my tool will do is to maintain/check the status of a few AIX (IBM's UNIX) machines. The way I will do that is to run commands on these remote machines and examine their output.
    For example, someone would click a button on a servlet and it would then rsh to the machine and run "ps -ef" or whatnot and post the output back to the user.
    Usually I could do this from another UNIX machine using rsh or telnetting to it, however, my machine is windows 2000.
    Is there anyway I could do this?
    Any help would be much appreciated.
    Mike

    try looking into the apache jakarta commons library
    for telnet and other useful classes.
    http://jakarta.apache.org/commons/net/apidocs/index.ht
    Oh, I like this answer better - can I change mine? If you can do it from "inside" Java like this, all sorts of ugliness involving where things get installed on various machines and versions of Windows just go away.
    Grant

  • Use SMA to run commands inside VM created from WAP

    Hello,
    I didnt find any SMA specific forum, so I post here.
    Im new to SMA and have a question that I cant find the answer to.
    We are about to deploy a new Hyper-V/SC/WAP enviroment.
    We use virtual networks and I have problem to connect and execute powershell on the virtual machines.
    I want to do some cutomizations on the VM after they are deployed (Windows Server 2012R2) from a Gallery item in WAP.
    In VM Clouds in Service Management Portal I have activated an Automation with Object = MicrosoftCompute VMRole and Action = Create.
    In my Runbook I check the status on the creation of the VM and when the status is complete I want to execute some powershell on the new server.
    So far so good, but here is my problem, I cant connect to the new VM.
    I have tried:
    $ComputerName = $ResourceObject.ComputerName
    InlineScript {
    Get-Service | Out-File “c:\test.txt”
    } -PSComputerName $ComputerName
    I have tired to add -PSCredential after -PSComputername aswell.
    The Runbook will enter a Suspended state with the following exception:
    Connecting to remote server Fredrik-Test failed with the following error message : WinRM cannot process the request. The following error occured while using Kerberos authentication: Cannot find the computer Fredrik-Test.
    It looks like SMA have no clue how to access the new VM.
    I went to the VMM server and ran the following script:
    $adminpasswd = ConvertTo-SecureString “xxxxx” -AsPlainText -Force
    $adminCredentials = New-Object System.Management.Automation.PSCredential (“administrator”, $adminpasswd)
    $VM = Get-SCVirtualMachine | Where-Object {$_.Name -eq ‘Computer013′}
    Invoke-Command -Computername $VM.ComputerName -ScriptBlock {Get-Service | Out-File “c:\test.txt”} -credential $adminCredentials
    And there I got same error:
    [Computer013] Connecting to remote server Computer013 failed with the following error message : The WinRM client cannot process the request because the server name canno
    t be resolved. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : OpenError: (Computer013:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : ComputerNotFound,PSSessionStateBroken
    How do I run commands inside the VM that is created from WAP in a Tenant cloud and use virtual network ?
    Regards
    Fredrik Ljus

    I get same error.
    Because I use Network Virtualization it looks like SMA or VMM cant find the VM.
    But how does it work if you for example make a gallery item that will install SQL.
    In that case the server will be installed from the original image with only the OS and then the SQL server will be installed after.
    How does the VMM/SPF communicate with the VM to install the SQL server? Bacause when installing the SQL server it mounts a VHD with the media and trigger the install localy on the VM.
    So, somehow it must be possible to communicate with the VM without using NAT and go through the Gateway server?

  • Configuring When Credit Checks are Run

    I am currently trying to find a way to change the points at which credit checks are run. I have stumbled across several documents here on the network about Critical fields etc, but have yet to find anything that explicitly shows how I may change when a credit check is run.
    Currently the system is running credit checks automatically at more points than we need, and we are in need of a way to configure when a check is run in the order process or for what specific order types.
    If anyone out there can help, it would be greatly appreciated.
    Thanks

    Hi Collins,
    Pro forma invoice are either order based or delivery based. Do you mean to say you are doing credit check in transaction VF01 or VF04?
    For delivered goods Invoice are normally based on delivery. Now whats situation in your case.
    Standard credit check works when you create order VA01, Delivery VL01N and at the time of PGI.
    What do you mean by both invoice steps? If Customer exceed credit limit Goods should not deliver to him. If once you delivered goods, then there is no use of Credit check.
    Do you mean to say you are delivering goods then checking Invoice?
    Regards

  • Run command doesn't remember command history

    Hi All,
    I'm running Windows 8.1, my Run dialog ox is always empty as shown below. Could anyone guide as how to enable Run command history?

    Hi aniruddha.jagdale,
    Is this a domain environment ?Did the run history work correctly before ?Have you made any modification to this machines before ?Will the other history recorded for example the jump list ,windows explorer ?
    According to my experience ,the run history will be recorded by default and it is usually recorded in the following registry keys .
    HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Explorer\ RunMRU
    For the options in the task and navigation properties ,please check the following options to have a check.
    We can try to login with another account to have a check .
    Best regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for