Code Monkey home page Code Monkey logo

my-powershell-scripts's People

Contributors

chriskyfung avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zer010101

my-powershell-scripts's Issues

🐛 Incorrect File Search Behavior with Backup Folder in TheBrain Scripts

Description

After introducing the backup folder under the user's Brain data directory, our PowerShell scripts are incorrectly searching for both original and backup files. This behavior is unintended, as the scripts should only look for original files under the user's Brain data directory.

Steps to Reproduce

  1. Create a backup folder under the data directory (e.g., .\Backup).
  2. Copy the file structure to the backup folder.
  3. Run the affected PowerShell scripts.
  4. Observe that the scripts are searching for files in both the data directory and the backup folder.

Expected Behavior

The scripts should only search for original files under the user's Brain data directory, excluding any files in the backup folder.

Actual Behavior

The scripts are searching for original and backup files.

Additional Information

  • Operating System: Windows
  • PowerShell Version: 5.1

Proposed Solution

Modify the script logic to exclude the backup folder from the search.

✨ Enhancement: Add Parameter for Image Width Percentage in theBrain script

I am writing to make an enhancement to the Resize-TheBrainNotesYouTubeThumbnail.ps1 script located in the "theBrain" folder. This enhancement involves adding a new parameter to allow setting the percentage of the image width and adjusting the number with the string $width={$CurrentWidth}p when $ImageType is resized.

Here is the proposed change:

# Parameters
$ImageType = 'default'  # [ValidateSet('default', 'resized')]
$CurrentWidth = 30  # [ValidateRange(1,100)]
$NewWidth = 50  # [ValidateRange(1,100)]
if ($ImageType -eq 'default') {
  $MatchInfo = Get-ChildItem -Path $SubFolders -Filter $Filename -Recurse | Select-String '\/(hq|maxres)default.jpg\)' -List
} else {
  $MatchInfo = Get-ChildItem -Path $SubFolders -Filter $Filename -Recurse | Select-String ('\/(hq|maxres)default.jpg#\$width={0}p\$\)' -f $CurrentWidth) -List
}
if ($ImageType -eq 'default') {
$NewString = $Pattern.Replace(')', '#$width={0}p$)' -f $NewWidth)
} else {
  $NewString = $Pattern.Replace('#$width=30p$)', '#$width={0}p$)' -f $NewWidth)
}

This change will make the script more flexible by allowing users to specify the width of the image as a percentage. It also sets 'default' as the default value of the $ImageType parameter, which simplifies the usage of the script.

Please let me know if you have any questions or need further information.

✨ Detect broken links within theBrain notes

Background

Motivation

We often use links to insert external resources, such as websites, images, or videos in our digital notes. However, these links may become broken over time due to various reasons, such as changes in the URL, deletion of the resource, or network issues. Broken links can affect the quality and usability of the notes. Therefore, it is important to find and fix broken links from the notes.

Objective

To develop a script to detect all the broken links from the Brain Notes. As a result, users can regularly scan their markdown files and fix the broken links as soon as possible.

Proposal

TheBrain 13 for Windows stores the Brain Notes with individual markdown (.md) files. To scan and identify broken links from the Brain notes, the script should include the following:

  • Loop through all the files in the Brain data directory
  • Scan a markdown file for links by using a regular expression
  • Define a function to check if a link is valid or not by sending a GET request to the link and checking the status code
  • Print or save the results to the console or a file

Example solutions

Here is a possible solution using Python generated by Bing AI:

# Import the modules
import os
import re
import requests

# Define the folder path
folder_path = "path/to/folder"

# Define a function to check if a link is valid
def is_valid_link(link):
    try:
        response = requests.get(link)
        return response.status_code == 200
    except:
        return False

# Define a function to scan a markdown file for links
def scan_markdown_file(file_path):
    # Open the file and read the content
    with open(file_path, "r", encoding="utf-8") as file:
        content = file.read()
    
    # Find all the links using a regular expression
    links = re.findall(r"\[.*?\]\((.*?)\)", content)
    
    # Check each link and print the result
    for link in links:
        if is_valid_link(link):
            print(f"{link} is valid in {file_path}")
        else:
            print(f"{link} is broken in {file_path}")

# Loop through all the files in the folder
for file_name in os.listdir(folder_path):
    # Check if the file is a markdown file
    if file_name.endswith(".md"):
        # Get the full file path
        file_path = os.path.join(folder_path, file_name)
        # Scan the file for links
        scan_markdown_file(file_path)

Here is a possible solution using PowerShell:

# Define the folder path
$folderPath = "path/to/folder"

# Define a function to check if a link is valid
function Test-Link {
    param (
        [string]$link
    )
    try {
        $response = Invoke-WebRequest -Uri $link -UseBasicParsing
        return $response.StatusCode -eq 200
    }
    catch {
        return $false
    }
}

# Define a function to scan a markdown file for links
function Scan-MarkdownFile {
    param (
        [string]$filePath
    )
    # Get the file content
    $content = Get-Content -Path $filePath -Raw
    
    # Find all the links using a regular expression
    $links = [regex]::Matches($content, "\[.*?\]\((.*?)\)") | ForEach-Object {$_.Groups[1].Value}
    
    # Check each link and print the result
    foreach ($link in $links) {
        if (Test-Link $link) {
            Write-Host "$link is valid in $filePath"
        }
        else {
            Write-Host "$link is broken in $filePath"
        }
    }
}

# Loop through all the files in the folder
Get-ChildItem -Path $folderPath -Filter *.md | ForEach-Object {
    # Get the full file path
    $filePath = $_.FullName
    # Scan the file for links
    Scan-MarkdownFile $filePath
}

These are just some possible ways to do it. There may be other ways to achieve the same goal.

Issues / Challenges

One of the challenges in developing a solution using PowerShell is the processing time required for checking if a link is valid and looping through all the links.

PowerShell is a scripting language that is designed for automation and configuration management, but it is not optimized for performance and speed. Therefore, it may take longer to execute certain tasks, such as sending HTTP requests and parsing regular expressions, compared to other languages, such as Python or C#. Moreover, PowerShell has a pipeline feature that allows users to pass the output of one command to another, but this can also introduce some overhead and latency.

As a result, the solution using PowerShell may have a longer processing time than the solution using Python, especially if the markdown files contain many links or the links are slow to respond. This can affect the efficiency and scalability of the solution, as well as the user experience and satisfaction.

💡 Write comment-based help in the exising scripts and functions

You should always write comment-based help in your scripts and functions.

Comment-based help is formatted as follows:

function Get-Example {
    <#
    .SYNOPSIS
        A brief description of the function or script.

    .DESCRIPTION
        A longer description.

    .PARAMETER FirstParameter
        Description of each of the parameters.
        Note:
        To make it easier to keep the comments synchronized with changes to the parameters,
        the preferred location for parameter documentation comments is not here,
        but within the param block, directly above each parameter.

    .PARAMETER SecondParameter
        Description of each of the parameters.

    .INPUTS
        Description of objects that can be piped to the script.

    .OUTPUTS
        Description of objects that are output by the script.

    .EXAMPLE
        Example of how to run the script.

    .LINK
        Links to further documentation.

    .NOTES
        Detail on what the script does, if this is needed.

    #>

Comment-based help is displayed when the user types help Get-Example or Get-Example -?, etc.

Your help should be helpful. That is, if you've written a tool called Get-LOBAppUser, don't write help that merely says, "Gets LOB App Users." Duh.

Further information: You can get more on the use of comment-based help by typing help about_Comment_Based_Help within PowerShell.

Reference

📄 Add README and LICENCE files

  • Create a README.md file that describes the project, its purpose, features, installation, usage, and contribution guidelines
  • Create a LICENSE file that specifies the terms and conditions for copying, modifying, and distributing the project
  • Add the license name and a link to the LICENSE file in the README.md file
  • Commit and push the changes to the main branch
  • Close this issue when done

🐛 Backup files automatically removed by TheBrain program

Problem

TheBrain program deletes all the backup files made by the PowerShell script after a certain period of time.

Suggestion

Save the backup files in a separate path instead of the node directories. This way, the software program will not delete them and you can access them whenever you need.

🧪 Create test files for existing scripts

To test PowerShell scripts without running them, you can employ various methods and tools. Here are some approaches to achieve this:

  1. Using Pester for Unit Testing:

    • Pester is a popular testing framework for PowerShell that allows you to perform unit testing on functions within a script without executing the entire script[3].
    • You can define stand-alone functions in your PowerShell script and then write Pester tests to specifically target and validate these functions[1].
    • Pester is designed for unit testing and is particularly suitable for testing PowerShell functions, providing a way to test specific units of code without running the entire script[3].
  2. What-If Parameter:

    • The What-If parameter is a common parameter in PowerShell that allows you to simulate the actions of a command without actually executing it[5].
    • By using the What-If parameter, you can safely test your PowerShell scripts without running them, as it provides a way to preview the changes that would occur if the script were to run.
  3. Test-ScriptFileInfo Cmdlet:

    • The Test-ScriptFileInfo cmdlet is used to validate the comment block at the beginning of a script that will be published with the Publish-Script cmdlet[6].
    • This cmdlet can be used to test a script file and display the results, ensuring that the script includes valid metadata. While this may not directly test the functionality of the script, it can help ensure that the script adheres to certain standards and requirements.

By leveraging these methods, you can effectively test your PowerShell scripts without executing the entire script, allowing for targeted testing of specific functions or simulating the script's actions without making actual changes.

Citations:
[1] https://stackoverflow.com/questions/75248197/is-there-any-way-to-test-functions-in-a-powershell-script-without-executing-the
[2] https://www.reddit.com/r/PowerShell/comments/bm5hki/in_ps_ise_is_there_a_way_to_run_my_script_without/
[3] https://blog.inedo.com/powershell/ps-testing/
[4] https://youtube.com/watch?v=-TgIRPHIYXI
[5] https://youtube.com/watch?v=FzeUBUrxbkg&t=0
[6] https://learn.microsoft.com/en-us/powershell/module/powershellget/test-scriptfileinfo?view=powershellget-2.x

Using Pester and PSScriptAnalyzer

Yes, there are several tools and plugins that can assist with testing PowerShell scripts. Here are some notable ones:

  1. Pester:

    • Pester is a popular testing framework for PowerShell that is best suited for unit testing PowerShell functions[1][3].
    • It is a free and open-source project designed for testing PowerShell, written in PowerShell[1].
    • Pester allows you to perform unit testing on functions within a script without executing the entire script, making it a valuable tool for testing specific units of code[3].
  2. PSScriptAnalyzer:

    • PSScriptAnalyzer is a static code checker for PowerShell modules and scripts that checks the quality of PowerShell code by running a set of rules[2][4].
    • It provides a static source code checker for modules and scripts, generating diagnostic records (errors and warnings) to inform users about potential code defects and suggesting possible solutions for improvements[6].
    • PSScriptAnalyzer is a valuable tool for examining PowerShell code and evaluating it for various best practices and secure code review[4].

These tools can greatly aid in testing PowerShell scripts, ensuring code quality, and identifying potential issues before execution.

Citations:
[1] https://blog.inedo.com/powershell/ps-testing/
[2] https://github.com/PowerShell/PSScriptAnalyzer
[3] https://devblogs.microsoft.com/scripting/unit-testing-powershell-code-with-pester/
[4] https://codewithvamp.medium.com/psscriptanalyzer-sast-tool-for-powershell-script-f2317e51e6e0
[5] https://www.varonis.com/blog/powershell-tool-roundup
[6] https://code.visualstudio.com/docs/languages/powershell

🦺 Add the `#Requires` statement in the existing scripts

To specify the minimum version of PowerShell or any modules or snap-ins that a script file or module depends on, you can use the #Requires statement at the beginning of the file or module. The #Requires statement prevents a script from running unless the specified prerequisites are met[1][2][4].

The #Requires statement has the following syntax:

#Requires -Version <N>[.<n>]
#Requires -PSSnapin <PSSnapin-Name> [-Version <N>[.<n>]]
#Requires -Modules { <Module-Name> | <Hashtable> }
#Requires -PSEdition <PSEdition-Name>
#Requires -ShellId <ShellId> -PSSnapin <PSSnapin-Name> [-Version <N>[.<n>]]
#Requires -RunAsAdministrator

Here are some examples of how to use the #Requires statement:

#Requires -Version 5.1
#Requires -PSSnapin DiskSnapin -Version 1.2
#Requires -Modules @{ ModuleName="Hyper-V"; ModuleVersion="1.1" }
#Requires -PSEdition Desktop

To determine the minimum PowerShell version needed for a command, you can look up the command on Microsoft Docs and click the version on the left to see what the minimum number is[3]. Alternatively, you can use the Get-Module (Get-Command <command name>).Module).PowerShellVersion command to find out what the minimum version is for a specific command[3].

It's also possible to use code to ensure that the client is using at least the minimum required PowerShell version. However, it's recommended to use the built-in #Requires statement instead[6].

Citations:
[1] https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_requires?view=powershell-7.3
[2] https://powershellisfun.com/2023/04/24/using-the-requires-statement-in-powershell/?amp=1
[3] https://www.reddit.com/r/PowerShell/comments/9fry3o/how_to_determine_minimum_ps_version_needed_for_a/
[4] https://ss64.com/ps/syntax-requires.html
[5] https://stackoverflow.com/questions/36166262/powershell-version-check-prior-to-script-execution
[6] https://blog.danskingdom.com/ensure-client-is-using-at-least-the-minimum-required-powershell-version/

✨ Implement PowerShell Script for Setting Tile Position in Windows 10 Start Menu

Description

I propose implementing a PowerShell script that allows users to set the position of a tile in the Windows 10 Start menu. This script will provide a convenient way for users to customize the layout of their Start menu tiles by specifying the row and column positions for individual tiles.

Proposed Solution

  1. Create a PowerShell script that exports the current Start Layout to an XML file.
  2. Allow users to edit the XML file to adjust the row and column positions of specific tiles.
  3. Develop functionality to import the modified XML file to apply the customized tile positions to the Start menu.

Tasks

  1. Develop a PowerShell script for exporting the Start Layout to an XML file.
  2. Enable users to edit the XML file to set tile positions.
  3. Implement a feature to import the modified XML file to update the Start menu layout.
  4. Test the script on Windows 10 to ensure compatibility and functionality.
  5. Document the usage and customization options for the script.

Additional Information

  • This feature will enhance user customization options for the Windows 10 Start menu.
  • The script should be user-friendly and provide clear instructions for editing the XML file.
  • Consider adding error handling and validation to ensure a smooth user experience.

Deadline

Please aim to complete this feature implementation within the next sprint cycle to incorporate it into the upcoming release.

Labels:

  • PowerShell
  • Windows 10
  • Start Menu

This GitHub issue will track the development and implementation of the PowerShell script for setting tile positions in the Windows 10 Start menu.

🔧 Set up Scirpt Analyzer to check PowerShell scripts in VS Code

To use PSScriptAnalyzer to check PowerShell in Visual Studio Code, follow these steps:

  1. Install PSScriptAnalyzer:

    • If you haven't already installed PSScriptAnalyzer, you can do so by running the following command in PowerShell:
      Install-Module -Name PSScriptAnalyzer -Force
  2. Open a PowerShell Script in Visual Studio Code:

    • Open Visual Studio Code and open the PowerShell script you want to analyze.
  3. Automatic Analysis:

    • The PowerShell extension for Visual Studio Code includes PSScriptAnalyzer by default and automatically performs analysis on PowerShell script files you edit in VS Code[4].
    • PSScriptAnalyzer comes with a collection of built-in rules that check various aspects of PowerShell source code, such as the presence of uninitialized variables, usage of PSCredential type, and usage of Invoke-Expression[4].
  4. Customizing Rules:

    • You can choose which rules to include or exclude for your modules and scripts[3].
    • PSScriptAnalyzer also allows you to include or exclude specific rules, providing flexibility in customizing the analysis based on your requirements[3].
  5. Code Formatting:

    • PSScriptAnalyzer also provides code formatting. You can invoke automatic document formatting with the Format Document command or the keyboard shortcut[4].
  6. Disable PSScriptAnalyzer:

    • If needed, you can disable PSScriptAnalyzer by opening your settings, browsing Extensions, selecting the PowerShell extension, and deselecting the checkbox for Script Analysis: Enable[4].

By following these steps, you can effectively use PSScriptAnalyzer to check PowerShell scripts within Visual Studio Code, ensuring code quality and adherence to best practices.

Citations:
[1] PowerShell/vscode-powershell#1476
[2] https://mverbaas.github.io/blog/VSCode-PSScriptAnalyzer/
[3] https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview?view=ps-modules
[4] https://code.visualstudio.com/docs/languages/powershell
[5] https://powershellisfun.com/2022/10/17/using-psscriptanalyzer-to-optimize-your-powershell-scripts/?amp=1
[6] https://codewithvamp.medium.com/psscriptanalyzer-sast-tool-for-powershell-script-f2317e51e6e0

To configure PSScriptAnalyzer rules in Visual Studio Code, you can follow these steps based on the information from the search results:

  1. Install PSScriptAnalyzer:

    • If not already installed, you can install PSScriptAnalyzer using PowerShell's package management system, PowerShellGet.
  2. Create a Settings File:

    • Create a PSScriptAnalyzer settings file (PSScriptAnalyzerSettings.psd1) in your project root or in the .vscode directory of your project.
  3. Specify Rules in the Settings File:

    • In the settings file, you can specify which rules to include or exclude for your modules and scripts. For example:
      # PSScriptAnalyzerSettings.psd1
      @{
          Severity = @('Error', 'Warning')
          ExcludeRules = @('PSAvoidUsingCmdletAliases', 'PSAvoidUsingWriteHost')
      }
    • You can also include specific rules to execute instead of all the default rules:
      # PSScriptAnalyzerSettings.psd1
      @{
          IncludeRules = @('PSAvoidUsingPlainTextForPassword', 'PSAvoidUsingConvertToSecureStringWithPlainText')
      }
  4. Invoke PSScriptAnalyzer with the Settings File:

    • Once the settings file is created, you can invoke PSScriptAnalyzer with the settings file using the following command:
      Invoke-ScriptAnalyzer -Path "Path\To\Your\Script.ps1" -Settings PSScriptAnalyzerSettings.psd1
  5. Visual Studio Code Workspace Settings:

    • You can also add PSScriptAnalyzer settings to the Visual Studio Code workspace settings file (settings.json) to configure the rules for your project.

By following these steps, you can configure PSScriptAnalyzer rules in Visual Studio Code, allowing you to customize the analysis based on your specific requirements and project needs.

Citations:
[1] https://lightrun.com/answers/powershell-vscode-powershell-allow-vscode-configuration-of-psscriptanalyzer-rules
[2] https://stackoverflow.com/questions/76288783/issue-with-two-custom-psscriptanalyzer-rules-in-vs-code
[3] https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules
[4] PowerShell/vscode-powershell#1476
[5] https://mverbaas.github.io/blog/VSCode-PSScriptAnalyzer/
[6] https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview?view=ps-modules

To create a PSScriptAnalyzer settings file in Visual Studio Code, you can follow these steps:

  1. Create a PSScriptAnalyzerSettings.psd1 file:

    • Create a new file named "PSScriptAnalyzerSettings.psd1" in the root directory of your project or in the .vscode directory of your project.
  2. Specify the rules in the settings file:

    • In the settings file, you can specify which rules to include or exclude for your modules and scripts. For example:
      # PSScriptAnalyzerSettings.psd1
      @{
          Severity = @('Error', 'Warning')
          ExcludeRules = @('PSAvoidUsingCmdletAliases', 'PSAvoidUsingWriteHost')
      }
    • You can also include specific rules to execute instead of all the default rules:
      # PSScriptAnalyzerSettings.psd1
      @{
          IncludeRules = @('PSAvoidUsingPlainTextForPassword', 'PSAvoidUsingConvertToSecureStringWithPlainText')
      }
  3. Specify the path to the settings file in Visual Studio Code:

    • Open the Visual Studio Code settings file (settings.json) by selecting "File" > "Preferences" > "Settings".
    • Add the following line to the settings file to specify the path to the PSScriptAnalyzer settings file:
      "powershell.scriptAnalysis.settingsPath": ".\\.vscode\\PSScriptAnalyzerSettings.psd1"
    • This line specifies the path to the PSScriptAnalyzer settings file in the .vscode directory of your project.

By following these steps, you can configure PSScriptAnalyzer rules in Visual Studio Code, allowing you to customize the analysis based on your specific requirements and project needs.

Citations:
[1] https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules
[2] https://www.ephingadmin.com/community-script-analyzer-rules-in-code/
[3] https://forums.ironmansoftware.com/t/resolved-psscriptanalyzer-warnings-in-vscode/3602
[4] https://www.powershellgallery.com/packages/PSScriptAnalyzer/1.11.0/Content/PSScriptAnalyzer.psd1
[5] https://www.reddit.com/r/PowerShell/comments/lt5w8q/where_do_i_place_the_psscriptanalyzersettingspsd1/
[6] https://mverbaas.github.io/blog/VSCode-PSScriptAnalyzer/

PSScriptAnalyzer contains a set of rules based on PowerShell best practices identified by the PowerShell Team and the community. These rules are designed to check various aspects of PowerShell code and generate DiagnosticResults (errors and warnings) to inform users about potential code defects and suggest possible solutions for improvements. Some common rules and recommendations associated with PSScriptAnalyzer include:

  1. Cmdlet Design Rules:

    • Use only Approved Verbs
    • Avoid using reserved characters in cmdlet names
    • Provide usage examples
    • Use the Notes section for details on how the tool works
    • Every exported command should have help (including parameter documentation)
    • Document the version of PowerShell that the script was written for
    • Indent your code
    • Avoid backticks
  2. Script Security:

    • Avoid using plain text passwords
    • Avoid using -Username and -Password parameters (use PSCredential instead)
    • Avoid hardcoding sensitive information
    • Use standard DSC methods
    • Use identical mandatory parameters for all DSC methods
    • Use identical parameters for Set and Test DSC methods

These rules and recommendations are organized by type and severity, and they cover various aspects of PowerShell script design, security, and best practices. You can choose which rules to include or exclude for your modules and scripts based on your specific requirements[1][5].

Citations:
[1] https://www.devopsschool.com/blog/a-fundamental-tutorial-of-psscriptanalyzer/
[2] https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/rules/readme?view=ps-modules
[3] https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview?view=ps-modules
[4] https://www.programming-books.io/essential/powershell/psscriptanalyzer-powershell-script-analyzer-0b7cf7ee492f454581d4e7892f94c559
[5] https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/rules-recommendations?view=ps-modules
[6] PowerShell/PSScriptAnalyzer#1551

To check the minimum PowerShell version required to run a script using PSScriptAnalyzer, you can use the PSUseCompatibleSyntax rule. This rule checks the syntax of the script and ensures that it is compatible with the specified versions of PowerShell. Here are the steps to use this rule:

  1. Create a PSScriptAnalyzerSettings.psd1 file:

    • Create a new file named "PSScriptAnalyzerSettings.psd1" in the root directory of your project or in the .vscode directory of your project.
  2. Specify the PowerShell versions in the settings file:

    • In the settings file, specify the PowerShell versions you want to target with your script. For example:
      # PSScriptAnalyzerSettings.psd1
      @{
          Severity = @('Error', 'Warning')
          Rules = @{
              PSUseCompatibleSyntax = @{
                  Enable = $true
                  TargetVersions = @( '3.0', '4.0', '5.0', '5.1', '6.0', '6.1', '6.2', '7.0', '7.1', '7.2' )
              }
          }
      }
  3. Invoke PSScriptAnalyzer with the Settings File:

    • Once the settings file is created, you can invoke PSScriptAnalyzer with the settings file using the following command:
      Invoke-ScriptAnalyzer -Path "Path\To\Your\Script.ps1" -Settings PSScriptAnalyzerSettings.psd1
    • This command will analyze the specified PowerShell script using the PSUseCompatibleSyntax rule and check if the script is compatible with the specified versions of PowerShell.

By following these steps, you can use PSScriptAnalyzer to check the minimum PowerShell version required to run a script, ensuring that the script is compatible with the specified versions of PowerShell.

Citations:
[1] https://devblogs.microsoft.com/powershell/using-psscriptanalyzer-to-check-powershell-version-compatibility/
[2] https://powershell404.rssing.com/chan-4440706/all_p22.html
[3] https://www.powershellgallery.com/packages/PSScriptAnalyzer/1.17.1
[4] https://github.com/PowerShell/PSScriptAnalyzer/releases
[5] https://www.powershellgallery.com/packages/PSScriptAnalyzer/1.20.0
[6] https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/overview?view=ps-modules

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.