Category "powershell"

Run Powershell script after the first one finished

How to modify the code be more neatly to make the first powershell function finished before starting the next one. Echo Clean Windows\Temp Fol

How to rename files and folders recursively?

I have this PowerShell code which goes through a folder and creates a list of all files and subfolders in the folder and renames them for me (replacing spaces w

PowerShell - Get Properties of MSI

Stackers, I am trying to get (from an MSI of Chrome Enterprise) a version number. After I download Chrome as a .MSI , I notice that I can see a number of proper

How can I validate WOPI is working on OOS on-prem using PowerShell or REST?

I'm trying to trouble shoot our on-prem OOS and read about the WopiTest framework for Office 365 at MS Docs - WOPI Validation application Does Office Online Ser

Run octave script from powershell and wait for it to finish

I'm trying to run a very simple octave .m file from Powershell but i can't manage to make powershell wait for it to finish. In fact, it launches the script exec

Powershell: Pass result of Get-AzTableRow to function

I am using below PowerShell code in azure functions to retrieve rows of users in azure table who belongs to a particular location. $Rows = Get-AzTableRow -table

Invoke-WebRequest : The remote server returned an error: (401) Unauthorized

I can download https://marketplace.visualstudio.com/_apis/gallery/publishers/blueprint/extensions/vsts-open-work-items-in-excel/0.1.71/package?noPrompt=true in

Unable to install service fabric runtime

Update By looking at the processes under Task Manager, I was able to locate the installer for Service Fabric Runtime (the first of the two components that are a

How to glob files into folders depending on their prefix

I have 4000 fish picture files, named as follows: acanthistius_cinctus_1 acanthistius_cinctus_2 acanthopagrus_latus_1 acanthopagrus_latus_2 ... There are 468 s

PowerShell output returns more fields than selected

I've been learning PowerShell over the past month and often times I've found through select statements or -properties iirc, that I get additional data that I do

Why do I get a 'cannot call a method on a null-valued expression' error?

I want to send an email using powershell and it's working perfectly but when I try adding attachment its giving me an error. This is the code $SMTPClient.Send($

Set-ExecutionPolicy unrestricted permission denied

I am trying to set the execution policy to Unrestricted, but I'm getting the following error: PS> Set-ExecutionPolicy Unrestricted Execution Policy Change Th

Scanning log file using ForEach-Object and replacing text is taking a very long time

I have a Powershell script that scans log files and replaces text when a match is found. The list is currently 500 lines, and I plan to double/triple this. the

SQL Server backup using powershell in Task scheduler

I am using PowerShell to backup a SQL Server database and use Windows task scheduler to schedule the script Test Run the script manually, it works. Both SQL Ser

How to fix "Powershell needs Windows management system 4.0'

I want to know How i install Powershell in my win 10 pc because it dont came installed in it Please help me. I will be very thankful to you

Powershell IP address range

I need to help with my code which is write in Powershell. Program should generate IP addresses in range. For example from 10.4.254.250 to 10.4.255.255. When I h

PowerShell Copy All Files in Folders and Sub=Folders Not older than 300 minutes

I am trying to copy all files in folders and sub-folders not older than 300 minutes, but the code I got working only copies the files in the main folder, it doe

How to filter excel file using three or more criteria and copy the filtered data to another sheet using powershell

I have a excel table as below: excel data I want to filter this file based on three criteria i.e. $criteria = "Rice","Vegetables","Butter" and copy the filtered

Reuse 2 functions in Start-ThreadJob

Assuming Get-Foo and Get-Foo2 and Deploy-Jobs are 3 functions that are part of a very large module. I would like to use Get-Foo and Get-Foo2 in Deploy-Jobs's S

Compress files with same name in powershell

I have a folder with more than 1000 file extensions. This is a sample of my files. AFG.cpg AFG.dbf AFG.prj AFG.sbn AFG.sbx AFG. shp AFG.shx AFG.cpg AGO.dbf AGO.