Search Results

Search found 14591 results on 584 pages for 'scripting language'.

Page 80/584 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • Scripted redirection for Outlook 2003

    - by John Gardeniers
    We have a staff member in sales who has gone onto a 4 day week (getting ready for retirement), so each Thursday afternoon her email needs to be forwarded to another user and each Friday afternoon it needs to be set back. I'm using the VBS script below to do this, run via the Task Scheduler. Although the script appears to do it's job, based on what I see when I view the user's Exchange settings, Exchange doesn't always recognise that the setting has changed. e.g. Last Thursday the forwarding was a enabled and worked correctly. On Friday the script did it's thing to clear the forwarding but Exchange continued to forward messages all weekend. I found that I can force Exchange to honour the changed setting be merely opening and closing the user's properties in ADUC. Of course I don't want to have to do that. Is there a non-manual way I can have Exchange read and honour the setting? The script (VBS): ' Call this script with the following parameters: ' ' SrcUser - The logon ID of the suer who's account is to be modified ' DstUser - The logon account of the person to who mail is to be forwarded ' Use "reset" to clear the email forwarding SrcUser = WScript.Arguments.Item(0) DstUser = WScript.Arguments.Item(1) SourceUser = SearchDistinguishedName(SrcUser) 'The user login name Set objUser = GetObject("LDAP://" & SourceUser) If DstUser = "reset" then objUser.PutEx 1, "altRecipient", "" Else ForwardTo = SearchDistinguishedName(DstUser)' The contact common name objUser.Put "AltRecipient", ForwardTo End If objUser.SetInfo Public Function SearchDistinguishedName(ByVal vSAN) Dim oRootDSE, oConnection, oCommand, oRecordSet Set oRootDSE = GetObject("LDAP://rootDSE") Set oConnection = CreateObject("ADODB.Connection") oConnection.Open "Provider=ADsDSOObject;" Set oCommand = CreateObject("ADODB.Command") oCommand.ActiveConnection = oConnection oCommand.CommandText = "<LDAP://" & oRootDSE.get("defaultNamingContext") & ">;(&(objectCategory=User)(samAccountName=" & vSAN & "));distinguishedName;subtree" Set oRecordSet = oCommand.Execute On Error Resume Next SearchDistinguishedName = oRecordSet.Fields("DistinguishedName") On Error GoTo 0 oConnection.Close Set oRecordSet = Nothing Set oCommand = Nothing Set oConnection = Nothing Set oRootDSE = Nothing End Function

    Read the article

  • Automate new AD user's home folder creation and permission setup

    - by vn.
    I know if we setup a base folder or a profile path in the Profile tab of an AD user, we can copy it and the folder creation and permission setup will be automated. My problem is that not all my users have a roaming profile and the home folder linking is done thru GPO. When I copy from these users, the home folder isn't created automatically and I have to create it manually and change permission and ownership on that folder, located on the fileserver. What should I do? A script may be nice but it'd have to be run everytime a new user is created and I don't think we can link a script to an AD user creation? I'd like to avoid any manual steps and keep my GPO that way. Using a W2008r2 DC on w7 client boxes. Thanks.

    Read the article

  • mysql -e option with variable data - Pass the variable value to insert sql statement in shell script

    - by Ahn
    The following shell script is not inserting the data to the table. How to pass the variable value to insert sql statement in a shell script. id=0 while true do id=`expr $id + 1`; mysql -u root -ptest --socket=/data/mysql1/mysql.sock -e 'insert into mytest1.mytable2(id,name) values (' $id ',"testing");' echo $id >> id.txt done I have modified the script as below and tried, and still having the issue id=0 while true do id=`expr $id + 1`; # mysql -u root -ptest --socket=/data/mysql1/mysql.sock1 -e 'insert into mytest1.mytable1(name) values ("amma");' mysql -u root -ptest --socket=/data/mysql1/mysql.sock -e 'insert into mytest1.mytable2(id,name) values ( $id ,"testing");' echo $id >> id.txt done error : ]$ ./insert ERROR 1054 (42S22) at line 1: Unknown column '$id' in 'field list'

    Read the article

  • Logging commands executed by remote shell scripts

    - by user145836
    I've noticed that when running a script that connects to a number of our servers (to essentially run batch commands) that the commands aren't logged in the user's .sh_history or .bash_history files. Is there a place where this is logged (assuming the script itself isn't doing the logging and I'm not tee'ing the output anywhere)? I'm talking specifically about AIX, but I would assume this question applies to all the *nix flavors. Thanks!

    Read the article

  • Connect to MySQL trough command line without need root password

    - by ReynierPM
    I'm building a Bash script for some tasks. One of those tasks is create a MySQL DB from within the same bash script. What I'm doing right now is creating two vars: one for store user name and the other for store password. This is the relevant part of my script: MYSQL_USER=root MYSQL_PASS=mypass_goes_here touch /tmp/$PROY.sql && echo "CREATE DATABASE $DB_NAME;" > /tmp/script.sql mysql --user=$MYSQL_USER --password="$MYSQL_PASS" < /tmp/script.sql rm -rf /tmp/script.sql But always get a error saying access denied for user root with NO PASSWORD, what I'm doing wrong? I need to do the same for PostgreSQL, any help? Regards and thanks in advance

    Read the article

  • How to configure Java Network Proxy Settings for domain computers

    - by adminParsed
    I need to set the Network Proxy Settings to Direct Connection, for computers on our domain. I have looked at the unattended setup configurations, as well as the deployment.properties file, and didn't see an option to set it to Direct Connection. Are there any alternate means to set this? ex...logon script, vbscript, powershell, GPO, (would be great, but I couldn't find anything on this) Thanks

    Read the article

  • How to rename multiple files by replacing word in file name geting from the shell script variables?

    - by fy6877
    This question like this thread. How to rename multiple files by replacing word in file name? My example is more complex than the above topic. The two variables are $name and $ newname getting from the shell script other location. $name and $ newname may have the unicode words or special symbles like []<?...etc,so could anyone help me to provide a method to add a part of script in shell scrit to solve file name replacing question. BTW,I try to type two kind of commands to change the part of file name, but it can't work. rename.ul '$name' '$newname' /home/fy6877/test/final/* ls /home/fy6877/test/final/|xargs -I$ rename.ul '$name' '$newname' $

    Read the article

  • output redirection not happening completely

    - by Gaurav
    I am running the following command on ubuntu 12.04 bash shell: hping3 -S -p 80 -c 30 www.google.com >> outputfile.txt But the problem is that this leaves some lines in the end and doesn't copy in the file. I even tried hping3 -S -p 80 -c 30 www.google.com >> outputfile.txt 2>&1 It also gives same problem. However this works perfect: ping -c 30 www.google.com >> outputfile.txt Any idea about what I might be missing?

    Read the article

  • Bash script to open, read, and write then save....

    - by Alex Vo
    I'm new on this bash script thing. Can you show me some example on writing Bash script. I want to write a script that can read from a filename and save it to a variable; increment the value of the variable and write that variable back to the file and save it. This is what I have started and stuck on it so far. #!/bin/bash # if file exist #echo "Testing \ "$1"" if [ -f "$1" ]; then echo "$1 does exist" else echo "$1 does not exist!" echo "Creating $1" touch $1 echo "This is test" > $1 exit 1 fi #echo "Testing \ "$2"" if [ "$2" == "" ]; then echo "Enter the filename" elif [ -f "$2" ]; then echo "$2 Fille does exist" else echo "$2 File doesn't exist" echo "Creating $2" touch $2 exit 1 fi counter=1 echo -n "Enter a file name : " read file if [ ! -f $file ] then echo "$file not a file!" exit 1 fi

    Read the article

  • Start a VPN session using a Terminal script

    - by craibuc
    I use an OSX Terminal session to start a VPN connection. The command that I execute at the prompt is: /etc/netlock/cvc -c :: This works as expected. I would like to save this to a script file that I can simply double-click to start. I created a file, 'vpn.command', added the command (list above), save it, and given execute permission: chmod +x vpn.command When I double-click the file, Terminal opens a BASH shell, executes the command, then exits. Upon closer inspection, the command is now '/etc/netlock/cvc -c ::; exit;' Why is the extra '; exit;' appended to my command? BTW, is there a way to execute another command, /etc/netlock/cvc -d, when the Terminal session is being closed so I can close the VPN automatically?

    Read the article

  • Batch script to create home home directories from list of names

    - by Steven
    I'm trying to create a home directories with permissions from a text file. I can only get the batch file to run the first line. Can anyone tell me why? I initiate the scripts by running go.bat as administrator. go.bat @echo for /f %%a in (users1.txt) do call test.bat %%a test.bat @echo off m: cd \ mkdir %1 icacls %1 /grant %1:(OI)(CI)M cd %1 mkdir public icacls public /inheritance:d icacls public / All:(OI)(CI)(RD) icacls public /grant All:(OI)(CI)R mkdir private icacls private /inheritance:d icacls private /remove All cd \ users1.txt user1 user2 user3

    Read the article

  • Is there a chroot build script somewhere?

    - by Nils
    I am about to develop a little script to gather information for a chroot-jail. In my case this looks (at the first glance) pretty simple: The application has a clean rpm-install and did install almost all files into a sub-directory of /opt. My idea is: Do a find of all binaries Check their library-dependencies Record the results into a list Do a rsync of that list into the chroot-target-directory before startup of the application Now I wonder - ist there any script around that already does such a job (perl/bash/python)? So far I found only specialized solutions for single applications (like sftp-chroot). Update I see three close-votes for the reason "off topic". This is a question that arose because I have to install that ancient piece of software on a server at work. So if you still feel this is off-topic - leave a comment...

    Read the article

  • The script not working as expected files dump path

    - by user3319390
    I have a script needs to be dump matching cname from my file contains and then matching scode to dump file to $cname/$year/$month/$day/ into files like access and error logs #!/bin/sh #base_dir="/home/vizion/Desktop" path="/home/vizion/Desktop/adn_DF9D_20140515_0005.log" name=$(basename "$path" ".log") for x in *.log; do year=${x:9:4}; month=${x:13:2}; day=${x:15:2}; done while read -r line do cname=$(echo ${line} | awk '{split($7,c,"/"); print c[3]}') scode=$(echo ${line} | awk -F"[ ]" '{print $9}') [[ ! -d "$cname/$year/$month/$day" ]] && mkdir -p "$cname/$year/$month/$day/" [[ ( ${scode} -ge 200 ) && ( ${scode} -le 399 ) ]] && { # [[ ! -d "$cname/$year/$month/$day" ]] && mkdir -p "$cname/$year/$month/$day/" echo ${line} >> /home/vizion/Desktop/$cname/$year/$month/$day/${cname}_${name}_access.log } [[ ( ${scode} -ge 400 ) && ( ${scode} -le 599 ) ]] && { [[ ! -d "$cname/$year/$month/$day" ]] && mkdir -p "$cname/$year/$month/$day" echo ${line} >> ${cname}_${name}_error.log } done < $path i am able to filter logs but not not dumping the exact location It's going other locations suggest to me correction in script

    Read the article

  • How can I automate or script daily downloads for any new anti- virus databases, and then have the program scan my drive?

    - by Macgrimm
    Howdy all Super Users" I humbly ask if any Super User can direct this long time, gray haired Apple Tech in the right direction on this issue. I believe there probably are many ways to skin this cat. But I am looking to find simply the best, most unattended way to get it done. Any help will be greatly appreciated. also (I know there are much better softwares out there for the Mac so please don't go there! The politics of this company dictate which Anti virus we have to use) anyway without any further wait: basically I am trying to automate 2 very important functions of Mc'Afee anti-virus for Mac. First I want to automate the process of retrieving new virus definition files, and second I want to automate the process of scanning for viruses. It turns out that Using Mc'Afee Anti-Virus for the Mac are both manual functions. And they left up to the user (per user account) to perform. Depending on all of about 150 MAc users to perform these 2 tasks themselves is around 65% compliance. My question then is: If I wanted to use the command line such as (open /Applications/McAfee\ Security.app) It will open up the Security Console. But how can I make command Mc'Afee go out and grab the definition files and scan the computer? I have to admit I am at a crossroad and Macaltimers has set in. I would really appreciate it if any of you "Super ~ Users" can help me out with this MacAltimers loss of how to what to do. Thanks to All up Front Macgrimm

    Read the article

  • Is there any way to remotely configure a Microsoft Lync account?

    - by John O
    There are no perl modules for Lync. No open source clients. Windows Powershell can do some things with it, but only on the server on which the server software is installed. It would be useful to be able to forward a certain desk phone number (we use Lync for voip) to a personal cell phone. We can do this from our own desktop machines, but only using the Lync client. It would be nice to be able to have a cron script run that just did rotations, I wouldn't have to carry around the lousy on-call phone with me. communicator.exe doesn't take any useful parameters. Nor are there any obvious function names in the DLLs that would let me just use rundll32.exe to accomplish this. There is a Lync SDK, but no examples of changing phone forwarding, and my Windows 7 machine refuses to install the Silverlight SDK dependency for some reason I can't fathom. Does anyone have any other ideas how I might accomplish this?

    Read the article

  • How do quotes/strings work in Powershell?

    - by Casey
    I'm have a command line that works in the regular old Windows Command Shell, but somehow gets misinterpreted in Powershell (I'm fairly new to Powershell). sqlcmd -S .\SQLEXPRESS -i "f:\SQLBackups\ExpressMaint.sql" -v DB="ksuite" -v OPTYPE="DB" -v BACKUPFOLDER="f:\SQLBackups" -v REPORTFOLDER="f:\SQLBackups\Reports" -v DBRETAINUNIT="days" -v DBRETAINVAL="7" Powershell seems to be stripping the drive letters out of the arguments that require paths. For example, I get the following when I attempt to run the above command in Powershell: Sqlcmd: ':\SQLBackups': Invalid argument. Enter '-?' for help. Well sure it's invalid without the drive letter. I have tried variations on double quoting it, escaping it, etc. but can't get it to work. What am I missing that Powershell does differently?

    Read the article

  • CGI Script not running in PHP file

    - by Unykvis
    I have a CGI script in the server called script.cgi and I have added the following code to the domain vhost: Action add-footer /cgi-bin/script.cgi AddHandler add-footer .htm .html I have change it to: Action add-footer /cgi-bin/script.cgi AddHandler add-footer .htm .html .php If the page is HTML the code will run but if the page is PHP the code will not run. Is there any code I need to add to the vhost so that PHP files can run this script? **EDITED:** I want to "inject" an HTML code in every possible page of the server this includes HTML and PHP files. The code only works for html files and I don't know why.

    Read the article

  • Shell Script to Start Mysql Server if not running

    - by user103373
    I have written a shell script to start mysql server & send a mail to admin user if it's restarted via shell script. What i am facing an issue if I run this shell script on terminal it's work perfectly & If same script runs via cronjob it's only sending the mail to the user & problem remains same. Is this problem relates to permission & how can i resolve it. Shell Script-------- #!/bin/bash EMAIL="[email protected]" SERVICE='mysql' if ps ax | grep -v grep | grep $SERVICE > /dev/null then echo "$SERVICE service running, everything is fine" else echo "$SERVICE is not running" /etc/init.d/mysql start cat <<EOF | msmtp -a gmail $EMAIL Subject: "Alert (Test Server) : Mysql Service is not running (Manually Restarted)" Mysql Server Restarted at: `date` EOF EXIT I am using msmtp for sending mail to the user on ubuntu 12.04 Server.

    Read the article

  • How can I retrieve statistics from my ghost cast server?

    - by Foxtrot
    I have a GhostCast server running for deploying images. I would like to have each ghost cast session to write to a file ( can be multiple text files or append to one file already there ) statistics. I know this is possible based on the options GhostCast software provides for writing to a log file, but I would like this automated for every image being backed up and restored. I don't want to have my employees click write to a new file every time. Is this possible?

    Read the article

  • solaris + match the network device name according to IP address

    - by yael
    how to find the device name as ( e1000g2 , e1000g3 , etc ) according to his IP address on Solaris machine for example ifconfig -a | grep 10.106.134.133 inet 10.106.134.133 netmask ffffff00 broadcast 10.106.134.255 ifconfig with grep command view only the line with the IP address , and the device name appears before the IP address so my target is to match the device name according to the IP address on Solaris machine , and then insert the device name in to parameter ( ksh ) please advice? full example: from ifconfig -a ( I get the IP and device name , what I need is to find the device name according to IP address , and insert the device name in to parameter ) e1000g2: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 inet 10.106.134.133 netmask ffffff00 broadcast 10.106.134.255

    Read the article

  • Shell script to fix bad filenames? [closed]

    - by Ze'ev
    I'm IT at my small firm; and, despite my dire warnings, everyone puts files on the server with awful names, including leading & trailing spaces, bad characters (including \ ; / + . < > - etc!) They do this by accessing the (FreeBSD/FreeNAS) server via AFP on Macs, so no part of the system complains. Is there a script I can use to go through an entire directory tree and fix bad filenames? Basically replace all spaces & bad ASCII with _ ... and if a file already exists, just slap a _2 or something on the end. I don't suppose there's a way to get the system to enforce good filenaming conventions, is there?

    Read the article

  • Anyone have a script to delete a specific local windows profile?

    - by Jordan Weinstein
    I'm looking for Powershell (preferred) script, or .CMD or .VBS, to delete a specific user profile on a workstation (WinXP) or terminal server (2000, '03 or '08). I know all about the delprof utility... That only allows you delete based on a period of inactivity. I want a script to: prompt admin for a username delete that username's profile and to delete the entire profile - registry hive too (not just the folder structure within Documents and Settings). The same way it would if you went to My Computer Properties Advanced tab User Profiles Settings and deleted profiles from there. Any ideas? All I can think of is doing an AD lookup to get the SID of the user specified, then using that to delete the correct registry hive too... something simpler would be nice though... Basically, my HelpDesk used to be local administrators on our Citrix servers and a common fix for various issues was for them to delete a user's profile on the citrix server(s) and have that user log back in - voila, whatever issue they had was resolved. Going forward, in new Citrix environment, they will no longer be local admins on those boxes, but still need to be able to delete profiles (deleting the entire profile: folder and reg hive is key). thanks.

    Read the article

  • Stream tar.gz file from FTP server

    - by linker
    Here is the situation: I have a tar.gz file on a FTP server which can contain an arbitrary number of files. Now what I'm trying to accomplish is have this file streamed and uploaded to HDFS through a Hadoop job. The fact that it's Hadoop is not important, in the end what I need to do is write some shell script that would take this file form ftp with wget and write the output to a stream. The reason why I really need to use streams is that there will be a large number of these files, and each file will be huge. It's fairly easy to do if I have a gzipped file and I'm doing something like this: wget -O - "ftp://${user}:${pass}@${host}/$file" | zcat But I'm not even sure if this is possible for a tar.gz file, especially since there are mutliple files in the archive. I'm a bit confused on what direction to take for this, any help would be greatly appreciated.

    Read the article

  • Same script, different behavior [migrated]

    - by Antoine_935
    I just stumbled upon an interesting bug... Still trying to figure out what is exactly happening. Maybe you can help. First, the context. I'm currently building yet another man to html converter (for some reasons I won't motivate here, but I need it). So, have a look at the screenshot below (see the link), more precisely at the outlined spots. See? On the upper shell, I have &lt ; and &gt ;, that is, escaped html. While on the shell below I have < and directly. But as you can see (or do I seriously need looking glass ?), the command man 2 semget | webmanneris the same on both sides, as is the which webmanner. The two are executed roughly at the same moment, with no modification made to the script between. [Oops, cannot post pictures just yet... Here comes the link] http://aspyct.org/media/webmanner-bug.png But the shell below is older (open about 1 hour ago). Newer shells all print out &lt ;. So my first guess was that it somehow had a cached reference to the old inode of the file, or old blocks or whatever. So I modified parts of the script, at the start and then at the end, to print different messages. And, surprise, the message shown up on both terminals. But still, same difference between &lt ; and <. I'm confused... How to explain that behavior? I'm working on a OSX 10.8 (Mountain Lion) EDIT: OK, there is one big difference: the shell below uses ruby 1.9.3, while above is 1.8.7. Is there any known difference in string handling between the two versions ?

    Read the article

  • Automate setup of constrained kerberos delegation in AD

    - by Grhm
    I have a web app that uses some backend servers (UNC, HTTP and SQL). To get this working I need to configure ServicePrincipalNames for the account running the IIS AppPool and then allow kerberos delegation to the backend services. I know how to configure this through the "Delegation" tab of the AD Users and Computers tool. However, the application is going to be deployed to a number of Active Directory environments. Configuring delegation manually has proved to be error prone and debugging the issues misconfiguration causes is time consuming. I'd like to create an installation script or program that can do this for me. Does anyone know how to script or programmatically set constrained delegation within AD? Failing that how can I script reading the allowed services for a user to validate that it has been setup correctly?

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >