PS Script to PrimalForms 2011 Help needed

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
PBilat
Posts: 7
Last visit: Tue Dec 19, 2017 1:09 am

PS Script to PrimalForms 2011 Help needed

Post by PBilat »

Hello everybody I use this PS Script to search Group Policy Settings. Can somebody help me to create a PrimalForms with all the PS Script content PS Script and details:<#.Synopsis Searches text files by pattern and displays the results..Description Searches text files by pattern and displays the results..NotesBased on versions from http://weblogs.asp.net/whaggard/archive ... ut.aspxand from http://poshcode.org/426 Makes use of Out-ColorMatchInfo found at http://poshcode.org/1095.#> #requires -version 2param ( [Parameter(Mandatory=$true)] [regex] $pattern, # [string] $folderpath = (Read-Host "Please enter folder to check","Ex. C:TestsGPOReports"), [string] $folderpath = "C:TestsGPOReports", # [string] $filter = (Read-Host "Please insert the File-Extension","Ex. *.HTML"), [string] $filter = "*.HTML", [switch] $recurse = $true, [switch] $caseSensitive = $false, [int[]] $context = 0) if ((-not $caseSensitive) -and (-not $pattern.Options -match "IgnoreCase")) { $pattern = New-Object regex $pattern.ToString(),@($pattern.Options,"IgnoreCase")} # Output as "Out-GridView"Get-ChildItem -Path:$folderpath -recurse:$recurse -filter:$filter | Select-String -caseSensitive:$caseSensitive -pattern:$pattern -AllMatche
s -context $context | Out-Gridview # Output as "CSV-File"# Get-ChildItem -Path:$folderpath -recurse:$recurse -filter:$filter | Select-String -caseSensitive:$caseSensitive -pattern:$pattern -AllMatches-context $context | Export-CSV -path C:TestsGPOSearch-Result.csv-notypeinformation -Delimiter ';' -Encoding 'ASCII' # Output as "Format-Talbe"# Get-ChildItem -Path:$folderpath -recurse:$recurse -filter:$filter | Select-String -caseSensitive:$caseSensitive -pattern:$pattern -AllMatches-context $context | Format-Table LineNumber, Line, Filename, Path -Wrap | Out-File C:TestsGPOResult.txt# Invoke-Item C:TestsGPOResult.txt General information:When the Administrator start the PS script, a popup windows appears in which the Admin must insert the desire
This topic is 11 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked