Jump to content

Hi, not sure if this is the correct place to post this, but I am looking for some powershell scripting help for an assignment.

I need some direction to a decent site or someone on here willing to help me out.  I have a working script giving me the correct output, but now I have to add something else and Im not entirely sure how to start.

 

 

Thanks!

Link to comment
https://linustechtips.com/topic/573144-powershell-help/
Share on other sites

Link to post
Share on other sites

Like the mod said we'll need some detail or even sample scripts.

But, if you mean you just need help adding to the script then you can either make a .bat or .vbs script to execute all the various power shell scripts or just add a line at the end of your current script to execute the next. 

                     .
                   _/ V\
                  / /  /
                <<    |
                ,/    ]
              ,/      ]
            ,/        |
           /    \  \ /
          /      | | |
    ______|   __/_/| |
   /_______\______}\__}  

Spoiler

[I5-12600k | 32gb DDR5 6000 | RTX5070 | 2x1tb M.2]

 

[Ryzen 5 1600 | 16gb DDR4 3200 | GTX1030 | 4x 8tb HDD] 

 

Link to comment
https://linustechtips.com/topic/573144-powershell-help/#findComment-7508417
Share on other sites

Link to post
Share on other sites

 

Thanks for the replies, I didn't wanna post a script if nobody was interested in helping.  I have to add a -tail parameter to the script below and error checking.

 

[CmdletBinding(SupportsPaging = $true)] 
param ( $file )
$nlines = 0
$data = Get-Content $file
foreach ($line in $data) { 
    $nlines++
    if ( $nlines -gt $PSCmdlet.PagingParameters.Skip ) {
    write-host $line }
}

 

Edited by prolemur
codetags
Link to comment
https://linustechtips.com/topic/573144-powershell-help/#findComment-7508560
Share on other sites

Link to post
Share on other sites

14 hours ago, RedWulf said:

Like the mod said we'll need some detail or even sample scripts.

But, if you mean you just need help adding to the script then you can either make a .bat or .vbs script to execute all the various power shell scripts or just add a line at the end of your current script to execute the next. 

bump

Link to comment
https://linustechtips.com/topic/573144-powershell-help/#findComment-7511132
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×