ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Tags
    3. scripting
    Log in to post
    • All categories
    • DustinB3403D

      Apple OSX - Public Desktop

      Watching Ignoring Scheduled Pinned Locked Moved Solved IT Discussion apple osx scripting automation setup
      25
      0 Votes
      25 Posts
      3k Views
      DustinB3403D

      I'm marking this solved as I create a direction from / called scripts and that does what I need.

      No real need for a public shareable desktop when this works just fine.

    • gjacobseG

      Batch file assistance: scroll text output

      Watching Ignoring Scheduled Pinned Locked Moved Unsolved IT Discussion windows 7 windows 10 batch scripting echo
      3
      1 Votes
      3 Posts
      712 Views
      gjacobseG

      and if you want to change the window size.

      https://stackoverflow.com/questions/8688846/resize-command-prompt-through-commands

    • wrx7mW

      PowerShell - Off-boarding Script

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell windows server active directory ad script scripting office 365 microsoft password password reset
      12
      1 Votes
      12 Posts
      3k Views
      dafyreD

      @wrx7m said in PowerShell - Off-boarding Script:

      @dafyre said in PowerShell - Off-boarding Script:

      @wrx7m said in PowerShell - Off-boarding Script:

      @dafyre I think I found where you got it - https://www.powershelladmin.com/wiki/Powershell_prompt_for_password_convert_securestring_to_plain_text

      Anyway, I am not sure where, in my script, I should place that function.

      You'd put the actual function at the top of your script, and then just

      $myPassword=convertFrom-SecureToPlain -securepassword $MySecurePassword

      Wherever you need the password in plain text form.

      Thanks. It mostly works. The only problem is that it isn't actually using the password I specify at the top. It is somehow generating its own and then writing it at the end. I put in

      write-host "Plain Text Says: $plainText"

      and it shows the password that I typed in for the secure variable at the beginning, followed by the one that it generated.

      Plain Text Says: $#@%4#@177 Jof91348

      Works fine for me here.... Check and make sure you don't have an extra write-host or anything somewhere.

      4a0db1d0-785c-4771-9ad2-9cec6cb0434a-image.png

    • RojoLocoR

      Use Powershell to audit Windows service accounts

      Watching Ignoring Scheduled Pinned Locked Moved Solved IT Discussion ps powershell scripting windows
      6
      3 Votes
      6 Posts
      1k Views
      RojoLocoR

      @Kelly said in Use Powershell to audit Windows service accounts:

      Unless you're wanting to use Powershell for a learning experience you might look at something like this: http://www.cjwdev.com/Software/ServiceCredMan/Info.html. If you still want to use the Powershell route this might be a good way to check the success of your script.

      That looks like it will do exactly what we want... thanks for the link.

    • JaredBuschJ

      Make this command better

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion scripting bash sed rsync directory comparison
      5
      1 Votes
      5 Posts
      731 Views
      M

      @JaredBusch : I'm not certain if this fits the bill, but what about the "diff" command? Of course, this does nothing to sync the files but does offer a way to simply compare the directories.

      diff -rs manxam jaredbusch

      This will get you :

      Files /home/manxam/TEST and /home/jaredbusch/TEST are identical Only in /home/manxam: i_am_manxam Only in /home/jaredbusch: you_are_jared
    • DustinB3403D

      OSX Shell Error Operation Not Permitted

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion apple osx quarantine shell bash scripting security troubleshooting brew
      2
      2 Votes
      2 Posts
      735 Views
      DustinB3403D

      Just used this again today, as another script I have had this attribute.

      Not sure when the attribute was written to the script though. But it's working now.

      This is the full error.

      /bin/sh: bad interpreter: Operation not permitted
    • JaredBuschJ

      Mass upload sound files into FreePBX

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion freepbx asterisk scripting config sounds how to
      4
      6 Votes
      4 Posts
      1k Views
      JaredBuschJ

      @NashBrydges said in Mass upload sound files into FreePBX:

      Very useful stuff, thanks for this.

      Self serving. I’m buildinging a mass import right now using this process.

    • JaredBuschJ

      Convert Asterisk dial plan for use in FreePBX

      Watching Ignoring Scheduled Pinned Locked Moved Unsolved IT Discussion asterisk scripting config freepbx converting dialplan
      9
      1 Votes
      9 Posts
      2k Views
      JaredBuschJ

      For reference, here is the same IVR dialplan as output by FreePBX

      asterisk -x "dialplan show ivr-4" [ Context 'ivr-4' created by 'pbx_config' ] '*' => 1. Set(__ivrreturn=0) [extensions_additional.conf:4167] [ivrsel-*] 2. Goto(app-blackhole,hangup,1) [extensions_additional.conf:4168] '0' => 1. Set(__ivrreturn=0) [extensions_additional.conf:4164] [ivrsel-0] 2. Goto(ivr-4,s,1) [extensions_additional.conf:4165] '9' => 1. Set(__ivrreturn=0) [extensions_additional.conf:4170] [ivrsel-9] 2. Goto(um-vm,s,1) [extensions_additional.conf:4171] 'fax' => 1. Goto(${CUT(FAX_DEST,^,1)},${CUT(FAX_DEST,^,2)},${CUT(FAX_DEST,^,3)}) [extensions_additional.conf:4149] 'h' => 1. Hangup() [extensions_additional.conf:4192] 'hang' => 1. Playback(vm-goodbye) [extensions_additional.conf:4194] 2. Hangup() [extensions_additional.conf:4195] 'i' => 1. Set(INVALID_LOOPCOUNT=$[${INVALID_LOOPCOUNT}+1]) [extensions_additional.conf:4173] 2. GotoIf($[${INVALID_LOOPCOUNT} > 3]?final) [extensions_additional.conf:4174] 3. Set(IVR_MSG=no-valid-responce-pls-try-again&custom/client_main) [extensions_additional.conf:4175] 4. Goto(s,start) [extensions_additional.conf:4176] [final] 5. Playback(no-valid-responce-transfering) [extensions_additional.conf:4177] 6. Goto(app-blackhole,hangup,1) [extensions_additional.conf:4178] 'return' => 1. Set(_IVR_CONTEXT=${CONTEXT}) [extensions_additional.conf:4187] 2. Set(_IVR_CONTEXT_${CONTEXT}=${IVR_CONTEXT_${CONTEXT}}) [extensions_additional.conf:4188] 3. Set(IVR_MSG=custom/client_main) [extensions_additional.conf:4189] 4. Goto(s,start) [extensions_additional.conf:4190] 's' => 1. Set(TIMEOUT_LOOPCOUNT=0) [extensions_additional.conf:4151] 2. Set(INVALID_LOOPCOUNT=0) [extensions_additional.conf:4152] 3. Set(_IVR_CONTEXT_${CONTEXT}=${IVR_CONTEXT}) [extensions_additional.conf:4153] 4. Set(_IVR_CONTEXT=${CONTEXT}) [extensions_additional.conf:4154] 5. Set(__IVR_RETVM=) [extensions_additional.conf:4155] 6. GotoIf($["${CHANNEL(state)}" = "Up"]?skip) [extensions_additional.conf:4156] 7. Answer() [extensions_additional.conf:4157] 8. Wait(1) [extensions_additional.conf:4158] [skip] 9. Set(IVR_MSG=custom/client_main) [extensions_additional.conf:4159] [start] 10. Set(TIMEOUT(digit)=3) [extensions_additional.conf:4160] 11. ExecIf($["${IVR_MSG}" != ""]?Background(${IVR_MSG})) [extensions_additional.conf:4161] 12. WaitExten(10,) [extensions_additional.conf:4162] 't' => 1. Set(TIMEOUT_LOOPCOUNT=$[${TIMEOUT_LOOPCOUNT}+1]) [extensions_additional.conf:4180] 2. GotoIf($[${TIMEOUT_LOOPCOUNT} > 3]?final) [extensions_additional.conf:4181] 3. Set(IVR_MSG=no-valid-responce-pls-try-again&custom/client_main) [extensions_additional.conf:4182] 4. Goto(s,start) [extensions_additional.conf:4183] [final] 5. Playback(no-valid-responce-transfering) [extensions_additional.conf:4184] 6. Goto(app-blackhole,hangup,1) [extensions_additional.conf:4185] Include => 'ivr-4-custom' [pbx_config] Include => 'from-did-direct-ivr' [pbx_config]
    • JaredBuschJ

      Need to parse large conf files

      Watching Ignoring Scheduled Pinned Locked Moved Solved IT Discussion scripting asterisk config
      53
      2 Votes
      53 Posts
      4k Views
      1

      @JaredBusch Glad it worked as intended.

    • EddieJenningsE

      Powershell Get-Childitem behavior with variables

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion windows server 2012 r2 powershell scripting
      11
      2 Votes
      11 Posts
      2k Views
      EddieJenningsE

      Must've been that one server. Seems like it's running fine on another one.

    • DustinB3403D

      Creating Scheduled Task with Powershell - Using specific user account

      Watching Ignoring Scheduled Pinned Locked Moved Solved IT Discussion powershell windows 10 scripting chocolatey task scheduler
      22
      0 Votes
      22 Posts
      9k Views
      ObsolesceO

      @wrx7m said in Creating Scheduled Task with Powershell - Using specific user account:

      @obsolesce said in Creating Scheduled Task with Powershell - Using specific user account:

      I know this post is old, but I've found doing scheduled tasks with SaltStack is insanely simple and very effective lately... so much more than using MS Group Policy.

      https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_task.html

      I really want to get back into learning saltstack again.

      Here's an example of a task that goes to all minions it's supposed to go to... and it "just works". No AD required.
      Also, using SaltStack to sync that .ps1 it runs from GitLab:

      0_1525903964206_a7c132dd-863e-484e-a947-e291f463a810-image.png

    • LakshmanaL

      Powershell output in Email is Possible

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell send-mailmessage windows scripting
      21
      1 Votes
      21 Posts
      4k Views
      ObsolesceO

      Here is a script I made to set up a scheduled task to either launch a PowerShell script, or a batch file.

      Comment out the $action line that you do NOT want to use. The below script will create a scheduled task that launches a PowerShell script called psScript.ps1.

      Note that you must execute these lines in an elevated PowerShell window.

      #Requires -RunAsAdministrator $action = New-ScheduledTaskAction -Execute 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -Argument "-ExecutionPolicy bypass -NonInteractive -NoLogo -NoProfile -File '\\server\path\to\psScript.ps1'" # $action = New-ScheduledTaskAction -Execute '\\server\path\to\batchFile.bat' $trigger = New-ScheduledTaskTrigger -AtLogon $principal = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest $settings = New-ScheduledTaskSettingsSet $task = New-ScheduledTask -Action $action -Trigger $trigger -Principal $principal -Settings $settings Register-ScheduledTask -TaskName "kickoff" -InputObject $task

      If you choose to launch the PowerShell script via a batch file, here's what you need to have in your .bat file:

      Powershell.exe -executionpolicy bypass -File "\\server\path\to\psScript.ps1"
    • NerdyDadN

      If I was a batch scripter, I'd starve...

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion batch scripts scripting script
      2
      2 Votes
      2 Posts
      863 Views
      DashrenderD

      Here are some instructions I found.

      http://www.instructables.com/id/How-to-make-flash-drive-that-copys-users-files-si/

    • gjacobseG

      Understand CMD CLI to Powershell Variable

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion cmd cmdlet ps powershell chocolatey batch script scripting
      2
      0 Votes
      2 Posts
      1k Views
      dbeatoD

      @gjacobse So basically you want to iterate through a list of computers the same script correct? So do you have a list of computers? What are other steps on your script? because what we can do is the following

      *$computers = import-csv -Path "c:\script\computers.csv" foreach ($oldname in $computers){ Rename-Computer -NewName $newname -DomainCredential domain\admin -Restart}

      This assumes you have a CSV file with a oldname and new name columns with computer names.

    • hobbit666H

      Powershell - Logoff disconnected sessions

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell scripting rdp sessions
      4
      2 Votes
      4 Posts
      2k Views
      hobbit666H

      not having much luck...... It's Friday so giving up till Monday/Tuesday šŸ™‚

    • NetworkNerdN

      Hytrust Configuration Backups with Powershell REST API Calls

      Watching Ignoring Scheduled Pinned Locked Moved Self Promotion networknerd blog networknerd hytrust hytrust encryption powershell api scripting networknerd powershell rest api disaster recovery vm encryption vmware networknerd vmware
      1
      2 Votes
      1 Posts
      1k Views
      No one has replied
    • mlnewsM

      Nine Resources for Learning JavaScript from OpenSource.com

      Watching Ignoring Scheduled Pinned Locked Moved Developer Discussion javascript scripting opensource.com visual studio code
      2
      2 Votes
      2 Posts
      1k Views
      GiggiuxG

      You don't know JS free open source book series is probably one of the best resources too. It explains how JS works, other than explaining how to program it in a nice way.
      I think that if someone understand well how a programming language works, then he should know how to program it in the proper way, no? šŸ™‚

    • gjacobseG

      Script Assistance requested

      Watching Ignoring Scheduled Pinned Locked Moved Solved IT Discussion batch script scripting windows 8.1 windows 8 windows 10 drive mapping vpn
      3
      0 Votes
      3 Posts
      1k Views
      gjacobseG

      Thanks @Mike-Davis

      That is just want was needed. added it to my other script and works great thus far.

    • DustinB3403D

      Trying to Improve my Powershell Skills - Need some guidance

      Watching Ignoring Scheduled Pinned Locked Moved Solved IT Discussion powershell windows scripting
      9
      3 Votes
      9 Posts
      1k Views
      ObsolesceO

      @DustinB3403 Ahh I see, then yes a prompt for input script is best then.

    • GreyG

      PowerShell AD Properties

      Watching Ignoring Scheduled Pinned Locked Moved Unsolved IT Discussion powershell scripting windows get-aduser active directory
      6
      0 Votes
      6 Posts
      1k Views
      ObsolesceO

      PowerShell Empire has some good modules that will do all that šŸ˜‰
      Check out BloodHound.

    • 1
    • 2
    • 3
    • 2 / 3