kolaborek08

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    @Olaf –Β Thank you for your reply πŸ™‚

    Yes, you have right – Start-Sleep was just to see how code is working.

    Code works quite well for my purposes, but I had some feeling that it can be written in the better way πŸ˜‰

    I’m beginner and I’m trying to improve my skills. Also thx for link to Best Practices. I’ll try to apply to them.

    in reply to: Command work in Powershell 7, but not in Powershell 6 and 5. #205941
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    @js:Β I added extra parenthesis and now it is working correctly.



    @Sam
    Boutros: Indeed, this is that case, when PS 7 shows its advangage over previous PS editions.

    Thank you all πŸ™‚

    in reply to: How to convert results to properly display in columns? #185018
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    Rob thank you. I think this is what I wanted πŸ™‚

    Now I can run this script in loop for an hour, save ping results to csv file and create chart from it.

    in reply to: How to convert results to properly display in columns? #184919
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    Thank you Rob for reply, but this is not quite what I want.

    Result from your code is like below:

    Server     Response
    ------     --------
    google.com       67
    onet.pl          11
    gmail.com       119

    And my goal is to have result like below:

    google.com   onet.pl  gmail.com 
            67        11       119
    
    in reply to: Wildcards with 'Get-ADUser -Filter' and 'variable' #168745
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    It works πŸ™‚

    But this is really black magic….

    in reply to: Display arrays from object #167020
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    Okay. Now I understand. Thank you πŸ™‚

    in reply to: Write-Information concatenate string and variable #166103
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    Gentlemen’s I want to thank all of you for such big part of knowledge πŸ™‚ Now I have big problem – I must understand all of it πŸ˜‰

    I will practice suggested solutions and will choose best for my purposes.

    Once again – thank you.

    in reply to: Write-Information concatenate string and variable #165925
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    😉 … you don’t need to use the code from the gallery … you can learn from it.

    Right πŸ™‚ Thank you once again πŸ™‚

    in reply to: Write-Information concatenate string and variable #165916
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    @Olaf,

    Out-File, Set-Content, and Add-Content looks very promising for my purposes. I must read about differences between them.

    Regarding PowerShell Gallery – I don’t want to use content written by someone else, because I want to learn PowerShell. But thank you for sugesstion πŸ™‚

    in reply to: Write-Information concatenate string and variable #165907
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    Hello kvprasoon πŸ™‚

    I use your code with Write-Information and its working πŸ™‚

    Write-Information -MessageData “Name: $(Get-CimInstance -ClassName Win32_Battery -Namespace root\CIMV2 | Select-Object -ExpandProperty Name)” -InformationAction Continue

    But to be honest, I don’t understand this syntax…

    “Name: $(Get-CimInstance -ClassName Win32_Battery -Namespace root\CIMV2 | Select-Object -ExpandProperty Name)” 

    Double quotes means that this is string forΒ -MessageDataΒ parameter. But what dollar sign means? About what should I read to get more info about that syntax?

    in reply to: Write-Information concatenate string and variable #165904
    Participant
    Topics: 9
    Replies: 11
    Points: 141
    Rank: Participant

    Hello Olaf, and thank you for reply πŸ™‚

    At this time I only want to display message in console, but in the future I’ll try to log all displayed informations to file.

    So thinking about future, Write-Information is better, or should I use Write-Host to display info to console, and then Add-Content to write it to file?

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