Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
2 answers
88 views

I have here code that recusively deletes all files/folder older than 7 days within a directory. The directory is fairly large last time I ran it took about 12 hours to finish. I know that getting ...
Tsogt's user avatar
  • 1
0 votes
1 answer
247 views

I am trying to install a new tree domain to my forest but I get the following error: The target server will be configured as a domain controller and restarted when this operation is complete. Do you ...
Ksenox's user avatar
  • 1
3 votes
0 answers
71 views

Trying to export the Certificate Key PEM file using Power Shell but getting the exception - Exception calling "GetRSAPrivateKey" with "1" argument(s): "Key not valid for use ...
The G.A.'s user avatar
0 votes
0 answers
44 views

when i tried to copy request objects from chrome browser by "Copy as PowerShell" option , and try to paste that into PowerShell in my machine. i am getting content in response as 3 ,instead ...
Dgan's user avatar
  • 10.3k
0 votes
0 answers
75 views

I have a PowerShell Script that cycles through multiple Excel Workbooks, runs a few VBA routines, and then closes. Unfortunately, I get the following error : Exception calling "Run" with &...
chrtak's user avatar
  • 71
3 votes
1 answer
114 views

I ran across some older code today that piqued my curiosity. I'm aware of 2x different syntactical ways of instantiating .NET objects in PowerShell 4.0 # Using New-Object to pass multiple args to the ...
Paul π's user avatar
  • 585
1 vote
3 answers
88 views

I have the following lines in a file: pc_cc_text$fx_review1 CONSTANT VARCHAR2(100) := 'For Company Review'; -- AD_PRT_AUTH_(MSP) pc_cc_text$fx_review2 CONSTANT VARCHAR2(100) := 'For Dept Review'; -- ...
user27817415's user avatar
0 votes
1 answer
1k views

I'm trying to get a specific file's Drive Item ID from a user's OneDrive using Microsoft Graph. The sample script below is working, but it's really slow because it has to search the entire user's ...
aasenomad's user avatar
  • 479
0 votes
1 answer
63 views

I have a need to delete all lines in a csv AFTER and INCLUDING a certain string. The string is as follows : S_Channel_Alt_View The file should then look like this I've tried to set something up ...
chrtak's user avatar
  • 71
0 votes
1 answer
110 views

/* I need a script SCCM detection key for match "Value Data" in "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" Without using "ValueName" Match "...
KIRAN's user avatar
  • 1
0 votes
2 answers
210 views

I am working on a health check PowerShell script that is generating an HTML file. Now, I want to update the solution where If I run the same script again (as a post check) it should create maybe ...
VrindaPrash's user avatar
0 votes
0 answers
164 views

Receiving the above error while connecting to exchange online through system center orchestrator runbook workflow. The path given was verified and correct. The script works completely fine when we run ...
Geethika Aravapalli's user avatar
1 vote
1 answer
514 views

So I know that by using this command we can loop through all the MKV / MP4 files in the current folder. But I don't want to have to Google and find out what all possible file-types or extensions the ...
Vicky Dev's user avatar
  • 2,253
0 votes
1 answer
66 views

I am trying to write a PowerShell script to look for certain strings in a text file but not getting very far., What I want to do is: Search line by line until "set name 'Web Traffic Filter - ...
julianhaines's user avatar
0 votes
1 answer
148 views

I'm trying to import excel file to csv format through power shell using this command import-excel c:\users\xxxx\TestFile.xlsx | export-csv c:\users\xxx\CSVFile.csv -NoTypeInformation -Encoding UTF8 ...
Sreepathi's user avatar
  • 119
0 votes
1 answer
97 views

The out put is not getting same replacement of line alignment.. but its not getting same alignment(which it should replace 3 lines. But it going zigzag replacement.. looks ugly, any help <Hello ...
Kevin's user avatar
  • 1
0 votes
1 answer
282 views

Trying to create simple events with ID's greater than 1000 to test a notification system using powershell. Write-EventLog –LogName System –Source FailoverClustering –EntryType Error –EventID 1793 –...
NanoNet's user avatar
  • 334
0 votes
1 answer
102 views

I have a script that extract set of sha256 hash from csv and save it in txt file, I want to add string (as a prefix) before each sha256 hash the script: $csvfileImport = "C:\test.csv" $...
yishai's user avatar
  • 27
0 votes
1 answer
113 views

I'm currently trying to enter RGB colors in the Excel Autofiter. Does anyone know how this works in Powershell? $WorkSheet1.Range("A6:AW6").AutoFilter(1,$WorkSheet1.color.rgb(0,255,0), 8) ...
Alexander Bressem's user avatar
2 votes
2 answers
91 views

I have below content in a txt file which will be read by powershell and should be rearranged based on a custom condition File: abc.txt General User1/Alert User1/LogicApp General/Abc User2/Alert User2/...
psg20's user avatar
  • 31
0 votes
1 answer
822 views

I am trying to invoke a power shell script using task scheduler but it gives me the error, The directory name is invalid Error (0x8007010B). I have tried placing the script in C: and C:\users and also ...
Dak's user avatar
  • 1
-1 votes
2 answers
498 views

I've below PS Script which connects to API and puts responses on an Array List. I'm struggling to convert Array List to CSV file and giving them a Column Header. Anyone got Idea how to this can be ...
Raif's user avatar
  • 27
1 vote
1 answer
97 views

I have a function to open a Excel sheet and one to manipulat differend cells in a excel sheet. Now I'd like to save and close the the Excel-data. But I pass only the Sheet object. How can I jump "...
TheRob87's user avatar
  • 146
0 votes
1 answer
113 views

We are currently in the process of migrating files and at the end of each migration we need to produce a report of any file that doesn't get migrated. (Not all source files are migrated). I produce a ...
Dominic Gibson's user avatar
0 votes
1 answer
56 views

I have a powershell script to fetch all the files in a folder but exclude all the files in a sub folder. I am using the following script, but not giving the expected results. Get-ChildItem -Path $...
DAR's user avatar
  • 49
0 votes
2 answers
58 views

I have a CSV-List to replace Strings in an XML. Now the CSV looks like: First;Secound One; Third Name;Beschreibung Neu;Func1 Number;handout her, func2 The Code is: #Splatennamen auslesen $...
TheRob87's user avatar
  • 146
0 votes
0 answers
93 views

Need to make a script where the script will read the date from text file, then add the time in the variable. Use the variable in the script and make a scheduled task at remote computer. $Reboot_Dt = ...
Bhupesh's user avatar
0 votes
2 answers
152 views

The following script works, but if I put an old email address that a user had it doesn't provide data. I want to show all the new and current emails address with me providing an old email address. ...
On3N3xus's user avatar
1 vote
1 answer
361 views

I am trying to build a script that installs an application with encrypted local admin credentials on the pc when the user logged in is not an admin. I am running the below cmdlet: $User = "admin@...
Arpit Kandhari's user avatar
0 votes
2 answers
301 views

I am writing a PowerShell script where-in I create a directory junction. During the development of the script I ran the New-Item command, saw the junction entry was created without looking closer at ...
Umit Cakar's user avatar
0 votes
1 answer
85 views

I am trying to get the value of a date variable into the string by concat $Lastextracteddate=Get-ChildItem $folder | Select-Object @{Name="LastWriteTime"; Expression={$_....
synccm2012's user avatar
0 votes
0 answers
92 views

I had another question asked on this issue I'm having with Powershell. I can't get all the columns to return from an array hashtable. I'm trying to search multiple PCs for certain updates but the ...
chathae's user avatar
  • 35
1 vote
0 answers
189 views

$Results = @() $MbxUsers = Get-EXOMailbox -resultsize unlimited foreach($user in $MbxUsers) { $Mbx = Get-ExoMailboxStatistics $user $Properties = @{ DisplayName = $user.DisplayName ...
Jai Nair's user avatar
-1 votes
1 answer
83 views

I'd like to split mp3 Files at a specific range by silence. To do that I have the following script, but don't know how to stop and restart the search function: $minDuraton = 180 $maxDuraton = 480 $...
TheRob87's user avatar
  • 146
1 vote
1 answer
77 views

I have 3 scripts in the following directories: C:\PS Caller.ps1 C:\PS\Module Connect.ps1 Statusbar.ps1 Caller.ps1 and Connect.ps1 contains the following code: Set-Location $PSScriptRoot.Replace(&...
TheRob87's user avatar
  • 146
0 votes
0 answers
210 views

Looking for some assistance. I have been tasked with re-enabling Inheritance for over 60TB of data. I am using Powershell to accomplish this. The issue I am running into is when the script runs, it ...
HollywoodHero's user avatar
0 votes
2 answers
71 views

I've this simple script and I'm wondering how can I split WebUrl value, add a new column called "UserID" and add it in there. Right now it look like this DisplayName WebUrl John Smit ...
aasenomad's user avatar
  • 479
0 votes
1 answer
199 views

I'm try to write an script which copy's member from "Group A" to "group B" but its failing as Group A has over 10000 members I have use following script Get-ADGroupMember -Identity ...
maj's user avatar
  • 29
1 vote
2 answers
778 views

I have a Script that took the Column number($lc) and Row Number ($sr / $lr). Now I'd like to select a Range from ($lc - 7)($sr) to ($lc)($lr). The problem is, I don't know how to convert a Column ...
TheRob87's user avatar
  • 146
0 votes
1 answer
91 views

I have an XMl which I'd like to expand. I want to select the 2. "Step" Node- > copy -> Change -Number- | -Name- and some inner-Text strings I want to select the 2. "Transition&...
TheRob87's user avatar
  • 146
0 votes
2 answers
712 views

I have multiple Excel Files where have nearly the same structure: Now I want to collect the Data reorganize it and save it to an single CSV. How can I save the Range (A2:C12) to an 2dim Array? 2. ...
TheRob87's user avatar
  • 146
0 votes
1 answer
898 views

I modified the function to create the task taking out some unnecessary actions. Now when I try to run it I get the error below. I have tried following a couple different parameter schemes. But I can't ...
jakebake's user avatar
  • 103
1 vote
1 answer
69 views

I'm sure there is a cleaner way to do this. I'm looking for a way to check the following when importing a csv: String Starts with S String is alpha numeric Sting has a length of 8 So far I have ...
chrtak's user avatar
  • 71
0 votes
0 answers
86 views

So, I have a PowerShell module that I want to use called psPAS. Its a wrapper containing APIs for CyberArk software where we use New-PASsession (and pass the URL) to authenticate to CyberArk ...
Piyush Garg's user avatar
0 votes
1 answer
51 views

I am trying to Create a Key and adding 3 dwords to it to make it easier for me to add to multiple computers. But PS is not returning any errors when running but the key and the DWORDs are not ...
Skippy's user avatar
  • 11
0 votes
0 answers
2k views

We have a requirement where we want to install Hindi Keyboard with Phonetic on user remotely using a schedule task with powershell. The schedule task is run in user mode since running in system mode ...
Ashishkumar Singh's user avatar
0 votes
0 answers
61 views

I have the following code which collects fiels from various directories: $Working_Dir1 = "$Env:ARCHIVEPATH\FDMEE\Data-$Env:_ENV\Actuals\Full_Year" $Latest_Dir = Get-ChildItem "$...
chrtak's user avatar
  • 71
1 vote
0 answers
73 views

Below is the code which I'm trying to run which installs software from machine A to B and then deletes the file from remote machine, which the installation works but cannot pass over the next piecce ...
Anthony's user avatar
  • 11
0 votes
3 answers
181 views

Im trying to add a new XML Node to a existing XML which is a API Response. But unfortunately i cannot get it to work trying many tutorials and examples. I cannot tell you which Options i tried but the ...
Nico's user avatar
  • 323
-1 votes
1 answer
42 views

I am new to powershell. I have a text file as below. I need to sort this file in powershell. ` <!DOCTYPE html> <html> <head><meta name="robots" content="noindex&...
Priyanka Gokave's user avatar

1
2 3 4 5
40