Welcome to OStack Knowledge Sharing 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
1.3k views
1 answer
    Consider the following code: function Test { [CmdletBinding()] param ( [parameter(Mandatory=$true)] [AllowNull()] ... work in this case? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I am trying to get the following function to work within PowerShell 6.0.2, however apparently Get- ... 'Windows Servers Storage Statistics' See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    We're using posh-git on Windows Powershell for source control. We're in the unenviable position of storing some ... !!! Any help appreciated! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I'm trying to terminate a script when running an external command results in an error. Consider this simple ... Script.ps1 : Exception caught. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I am using Get-Content (gc) here. I need to delete a set of lines defined by the start and end ... line5 Expected output: line1 line2 line5 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I can only get the length when exporting this to csv, how should it be done properly. $redo = Import-CSV c:empestimport. ... 27" "48" "55" "42" See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    To move files into folders I use this script @echo off setlocal EnableExtensions DisableDelayedExpansion rem // Define ... accepted for answer. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I'm new to PowerShell and running PowerShell cmd-lets in C#. Specifically, I'm trying to use Citrix's XenDesktop ... Console.ReadLine(); } } } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    So having some good old fashion Powershell frustrations today. What I need to do is this: Get a list of ... help would be much appreciated! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I'm trying to convert string variable to datetime format: [DateTime]::ParseExact($tempdate, 'dd.MM.yyyy', [ ... to datetime in other way? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    My Powershell code doesn't evaluate the $agent variable: foreach ($agent in $agentcomputers) { Write-Output ' ... -ArgumentList @($agent) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I am recovering files from a hard drive wherein some number of the files are unreadable. I'm unable to ... but regardless, it seems relevant. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    So I've been assaulting the internet all day looking for a way to combine multiple CSV files. I keep running ... columns of data but found 6 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I am working on a little PowerShell script that should remove a named column. Is there a way to not NOT select ... the header in the CSV file. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    This is my sample xml data. Please ignore if there is any syntax error or some missing xml features. The task ... ); } $xml.Save($getxmlpath); See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.7k views
1 answer
    $global:ProjectName = $null function RunFirst(){ RunSecund Write-Host $global:ProjectName } ... (PSUseDeclaredVarsMoreThanAssignments) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I'm not quite sure if this exact question is a duplicate, but I couldn't find my specific question on ... evaluating 'true' to $true? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I spend most of my time on command line ( XP / 7 ) and always find myself customizing the command prompt ... a batch file or PowerShell script? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I am running a script which has $FileName variable containing the absolute path with spaces. Due to the space ... X:MoviesFile OneFile One.txt See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    Recently, I've been playing with PowerShell, and I've noticed some weird behavior when using pipes and foreach ... does the second one fails? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I want to add text into specific line of txt file. I can't find any solution on internet. This code adds text ... | Add-Content "C:mpest.txt" See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.2k views
1 answer
    I have to combine multiple CSV files into a single one. Each of the CSV has a header. One of the columns header ... a way to ignore/fix this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I'm trying to use the PowerShell commandlet Invoke-RestMethod to post a picture to a url ... .PowerShell.Commands.InvokeWebRequestCommand See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I have an XML configuration file I am modifying with PowerShell, and when I save the file using Xml.Save it ... = $newValue $xml.Save($file) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.1k views
1 answer
    When I run this command, it returns the output with lots of blank lines. Get-Host | Select Name, Version ... Name, Version | Format-List See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I have an XML config loaded into my script as an xml object called $appConfig. I am trying to replace ... </connectionStrings> </configuration> See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I have an array like this: OptiPlex 790 Precision WorkStation T7500 Precision WorkStation T7400 Precision T1500 Precision ... to new array. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I built a script that converts .doc files to .docx. I have a problem that when the .doc file is password- ... .Open method to open the file. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...