Testing Only.

Home Forums Scripting General Scripting Testing Only.

This topic contains 5 replies, has 2 voices, and was last updated by Avatar wullieb1 2 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Avatar
    wullieb1
    Moderator
    #166488

    Some VBScript in code tags

    Dim filesys, filetxt
    Const ForReading = 1, ForWriting = 2, ForAppending = 8

    Set filesys = CreateObject(“Scripting.FileSystemObject”)
    Set filetxt = filesys.OpenTextFile(“c:Archive.acl”, ForAppending, True)

    filetxt.WriteLine(“Your text goes here.”)
    filetxt.Close [/CODE][CODE]Dim filesys, filetxt
    Const ForReading = 1, ForWriting = 2, ForAppending = 8

    Set filesys = CreateObject(“Scripting.FileSystemObject”)
    Set filetxt = filesys.OpenTextFile(“c:Archive.acl”, ForAppending, True)

    filetxt.WriteLine(“Your text goes here.”)
    filetxt.Close [/CODE]

    Avatar
    wullieb1
    Moderator
    #245468

    Some powershell

    Function Redirect-Email
    {
    #This will redirect the users email to a specific user
    #Get the required parameters to set the information needed to activate the redirect
    $RedirUser = read-host “Enter the user who’s email will be redirected:”
    $DirEmail = read-host “Enter the name of the user to redirect to:”

    #Set the mailbox data from the required information
    Set-Mailbox -Identity $RedirUser -DeliverToMailboxAndForward $true -ForwardingAddress $DirEmail

    } #End Function Redirect-Email[/CODE][CODE]Function Redirect-Email
    {
    #This will redirect the users email to a specific user
    #Get the required parameters to set the information needed to activate the redirect
    $RedirUser = read-host “Enter the user who’s email will be redirected:”
    $DirEmail = read-host “Enter the name of the user to redirect to:”

    #Set the mailbox data from the required information
    Set-Mailbox -Identity $RedirUser -DeliverToMailboxAndForward $true -ForwardingAddress $DirEmail

    } #End Function Redirect-Email[/CODE]

    Avatar
    wullieb1
    Moderator
    #245469

    Function Redirect-Email
    {
    #This will redirect the users email to a specific user
    #Get the required parameters to set the information needed to activate the redirect
    $RedirUser = read-host “Enter the user who’s email will be redirected:”
    $DirEmail = read-host “Enter the name of the user to redirect to:”

    #Set the mailbox data from the required information
    Set-Mailbox -Identity $RedirUser -DeliverToMailboxAndForward $true -ForwardingAddress $DirEmail

    } #End Function Redirect-Email[/CODE][CODE]Function Redirect-Email
    {
    #This will redirect the users email to a specific user
    #Get the required parameters to set the information needed to activate the redirect
    $RedirUser = read-host “Enter the user who’s email will be redirected:”
    $DirEmail = read-host “Enter the name of the user to redirect to:”

    #Set the mailbox data from the required information
    Set-Mailbox -Identity $RedirUser -DeliverToMailboxAndForward $true -ForwardingAddress $DirEmail

    } #End Function Redirect-Email[/CODE]

    Avatar
    wullieb1
    Moderator
    #245470

    Dim filesys, filetxt
    Const ForReading = 1, ForWriting = 2, ForAppending = 8

    Set filesys = CreateObject(“Scripting.FileSystemObject”)
    Set filetxt = filesys.OpenTextFile(“c:Archive.acl”, ForAppending, True)

    filetxt.WriteLine(“Your text goes here.”)
    filetxt.Close[/CODE][CODE]Dim filesys, filetxt
    Const ForReading = 1, ForWriting = 2, ForAppending = 8

    Set filesys = CreateObject(“Scripting.FileSystemObject”)
    Set filetxt = filesys.OpenTextFile(“c:Archive.acl”, ForAppending, True)

    filetxt.WriteLine(“Your text goes here.”)
    filetxt.Close[/CODE]

    Avatar
    biggles77
    Spectator
    #214131

    Your missing one example Wullie. Need to make one where the code would wordwrap normally but with the code wrapper will have the scroll bars so you can see the single line of code. Comprende amigo? I isn’t clever enough to grab some lone single line of code to add to your list coz I can’t find any right now. Dumbme eh. :mrgreen:

    [EDIT]

    Now that I have finished reading through the site, this is just a dumb shit post. Sorry Wullie I misunderstood what you wuz doing. Take comfort that you are 22°C warmer than we are today. However that drops to ONLY 15°C warmer tomorrow. I am inside with ducted heating on (for Queenslanders, it is a gas device that heats the air to under normal Queensland temperature so we don’t become blocks of freaking ice), covered in a thick blanket and my feet are freezing. Must be time to migrate north.

    Avatar
    wullieb1
    Moderator
    #245473
    biggles77;n506297 wrote:
    Your missing one example Wullie. Need to make one where the code would wordwrap normally but with the code wrapper will have the scroll bars so you can see the single line of code. Comprende amigo? I isn’t clever enough to grab some lone single line of code to add to your list coz I can’t find any right now. Dumbme eh. :mrgreen:

    [EDIT]

    Now that I have finished reading through the site, this is just a dumb shit post. Sorry Wullie I misunderstood what you wuz doing. Take comfort that you are 22°C warmer than we are today. However that drops to ONLY 15°C warmer tomorrow. I am inside with ducted heating on (for Queenslanders, it is a gas device that heats the air to under normal Queensland temperature so we don’t become blocks of freaking ice), covered in a thick blanket and my feet are freezing. Must be time to migrate north.

    Been having random issues posting code that appear to have been fixed now.

    Welcome back mate. Good to see you posting again.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Testing Only.’ is closed to new replies.