Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged powershell

0 votes
868 views
1 answer
    I am creating a quick temporary fix so sorry if this is dirty, but- Objective I would like to use Powershells Register-Event cmd to wait for a file ... ? (Scripting only, remember this is a hotfix). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
784 views
1 answer
    I've been banging my head against the wall on this one. I know that if I create an Array in Powershell, then copy the array, it'll copy it as a ... to make it clearer what I'm trying to accomplish here. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
777 views
1 answer
    I am trying to create a script to remove all but the newest certificate from any given smart card (in the SC Reader at the time). This is something ... since his comment is what lead me to the solution. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
822 views
1 answer
    I have a foreach loop that currently puts three entries in my hashtable: $result = foreach($key in $serverSpace.Keys){ if($serverSpace[$key] -lt 80){ ... count of $result. Any help would be appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
956 views
1 answer
    I am trying to create a PowerShell script to SSH into a Raspberry Pi and perform some commands. I am using Plink to SSH into the Pi over command line ... reported. Thank you for any help you can provide. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    Given the following script: function f { [CmdletBinding()]Param() Write-Verbose 'f: Start' $t = New-Object 'System.Collections.ArrayList' Write-Verbose ... $things be-of-type ArrayList at the final line? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
646 views
1 answer
    While I did find a lot of information on how to name Cmdlets and functions in the Cmdlet Development Guidelines I did not find any information on ... not case-sensitive when it comes to executing.) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
566 views
1 answer
    I am trying to implement information updates in an XML file, by multiple processes running on multiple machines somewhat concurrently. My thinking is to loop ... of a way with or without sentinel files. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
869 views
1 answer
    I have a small program which accepts an integer and converts it to DateTime. However, I try to use KeyCode to only allow numbers from both keyboard and ... } else { $_.SuppressKeyPress = $true } } } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I wrote out a simple PowerShell script that backs up a directory to C: and then deletes any of the backup folders when its age = X days. For some reason ... sure why I'm getting a Cannot find path error. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
831 views
1 answer
    It seems that Invoke-WebRequest cannot serialize arrays as POST form data: PS> $uri = "http://httpbin.org/post" PS> Invoke-WebRequest $uri -Body @{Stuff=[ ... ", "Connection": "close", "Content-Length"... See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
862 views
1 answer
    At the end of my script I use 'ie' | ForEach-Object {Remove-Variable $_ -Force}. It works fine in PS 2 (Windows 7) but PS 5 (Windows 10) throws an ... 5; or should I just use Remove-Variable 'ie' -Force? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    does anyone know how to disable quick edit mode from within a powershell script? This question's "answer" is not an answer: Enable programmatically the ... line options to disable quick edit. Thanks. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    How can I supress the detailed information from Test-NetConnection -ComputerName localhost for a PowerShell session? Test-NetConnection writes quite a ... Test-NetConnection will listen to. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
819 views
1 answer
    Is it possible to print variable names in PowerShell? $myVariable = "My Value" Write-Host "The variable name is ?????" Expected output: ... $myVariable Expected output: The variable name is myVariable See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I have a powershell function that processes a list of files. I use the begin, process and end blocks for this: begin { # prepate some stuff ... interrupts, while keeping the begin/process/end structure? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I wrote a small PowerShell script to send a request to a server and get a simple XML result back. PowerShell Script $xml = "<?xml version='1.0' encoding= ... with data and that it sent a -1-byte payload. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
688 views
1 answer
    I am trying to create a script where I will be searching the file servers for non inherited permissions. I have run into the 260 character limit for ... the behavior that I am showing with New-PSDrive. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
570 views
1 answer
    If I declare and initialize a PowerShell variable with $global:MyVariable = "123" do I then need to use $global: anywhere I use the variable or can I just use $MyVariable? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
702 views
1 answer
    I've run into a problem with my PowerShell scripts where I am "losing" output that was going to the console, or being redirected. After much legwork, ... . Bug? Or failure to comprehend on my part? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
763 views
1 answer
    I have two functions: Function1 { Function2 return 1 } Function2 { return 0 } After executing Function1 it should return 1, but it returns 0. Why is that? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
551 views
1 answer
    PowerShell has a pretty good built-in help system that I use a lot and I'm able to see all help options with Get-Help * and query Cmdlets or can look ... in some about_* topics that I've not found yet). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
663 views
1 answer
    I am looking for a reliable command-line method of getting SHA256 hashes for files in Windows. My understanding is that the way to do this is via ... , it would need to be a supported download. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
637 views
1 answer
    Modifying certain aspects in PowerShell scripts seem to modify the running shell. This would be expected if I source the script instead of running it. ... is active and cultural change persisted... See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
798 views
1 answer
    I have VSTS builds that use the Powershell script to access the VSTS API, similar to that detailed in Microsoft's Documentation. The document states: ... intervention. How should this be done now please? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
675 views
1 answer
    I'm trying to search for keywords across a large number of MS Word documents, and return the results to a file. I've got a working script, but I wasn ... be very large. Any ideas on how to optimize this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
573 views
1 answer
    I created a similiar script like that: $Groups = Get-QADGroup $Result = @() $Groups | ForEach-Object { $Group = $_ $Members = Get-QADGroupMember $Group - ... is no user, the column cell just stays empty. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
788 views
1 answer
    This works to count *.jpg files. PS C:> @([System.IO.Directory]::EnumerateFiles('C:UsersPublicPictures', '*.jpg', 'AllDirectories')).Count 8 How can an -ErrorAction Continue ... ~~~~~~~~~~~~~~~~~~~~~~~~~ See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
...