Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Browsing all 8411 articles
Browse latest View live

Split after regex pattern + space

I have a regex pattern, ".+\s.{2}\s.{3}\s.{3}\s.{2}\s.+\d{4}\s".    I always want to split the text on the last space \s, but keep the string which matches the pattern together.  How to do it? Thank...

View Article


How to get an arguments from exe files?

Hi there,I have a problem with silent installation of this exe file - I cannot get any arguments to argument list from this exe file. How can I get some arguments from this file...

View Article


Need one Powershell script to move the files

Hello... need one powershell script for below requirement.1st we need to copy the file in one FTP location and then we need to Cut & Paste (move) all the files from below folder to another shared...

View Article

convert Text to objects

My PowerShell skills are very limited and I was hoping to get some help.  I need to convert output text from a legacy CLI tool into objects so that I can better utilize Powershell's capabilities.  The...

View Article

Help with joining two variable arrays

I currently have a script that queries some hyperV hosts in our environment (These are not clustered).The script asks the user for input of the name of the HyperV Hosts they would like to query for...

View Article


Using a batch file to execute .ps1 files in other directories in order

What i have is this batch file that I would like to adapt.  I am new to PS.IN G:\MyDirectory\TestStartFile.batcd /d %~dp0powershell.exe -File sp_script.ps1pauseIN...

View Article

Download and extract a ZIP file

This PowerShell one-liner downloads and extracts a ZIP file using the SysinternalsSuite.zip file as an example.Read More

View Article

Retrieve User Information based on CSV File

I am trying to do the following -1. Import a CSV file with LastName, FirstName2. Match the User Account based on LastName3. Export the same user with Title in AD and also Account Status - Enabled or...

View Article


script to unexpire user account and expire same day

Hi we have a group of user accounts that remain expired; if needed we would then set the "expires end of" attribute to today's date to enable it temporarily. Would like to set up a script that can...

View Article


i need script for List all domain users of a specific OU

i need script for List all domain users of a specific OUKindly help me ASAP.

View Article

The specified path, file name, or both are too long

HiHoping someone can help, I've been running a script to delete files/folders and it's been running great, however recently some of the folder names have become very long and the script cannot delete...

View Article

Importing an Incompatible VM with PowerShell

Yesterday I stepped through the process of registering an incompatible virtual machine with PowerShell.  But what if you want to import the virtual machine instead of registering it?  Well, the process...

View Article

Registering an Incompatible VM with PowerShell

If you have ever tried to register a virtual machine in Hyper-V Manager, and the virtual machine was not compatible with your current computer, you would have seen something like this:Read More

View Article


PowerShell's Write-Progress Explored

The last few lessons have been on displaying status messages in your PowerShell scripts and functions. There is also a built-in cmdlet that doesn't get used as much as it should so I thought I'd give...

View Article

Check Internet speed

I m trying to write a powershell script but i am facing some problem.Script-I need Powershell script for measure internet speed for multiple computers.o.s.-Windows 7,Windows 8,vistaKindly help me ASAP.

View Article


Create mailbox in Smallest Exchange Database

It is always remommend to care mailbox where the database is very small. Below powershell script helps to find the smallest database in the exchange orginization and create the mailbox...

View Article

Capture CPU & Memory - every x number of minutes, write to file - almost there?

Hello,I'm trying to capture the cpu utilization and memory from a few servers and write the info to a file.The function below I've worked on and I can't get to the next point of starting by specifying...

View Article


Replacing hex character in web.config file

I have the following script that is customizing several web.config files (from an outside vendor). I have discovered that some of these files have an unrecognized character in them (hex C2 A0). Once...

View Article

Delete the list from SQL Server using PowerShell

Good Day,I found the records for the list on one of the tables in our SQL Server.But on the sharepoint site it is saying that we still have 300K records but we only uploaded 26K records.Is there a way...

View Article

Batch files for Powershell

If i have this in my batch file:cd /d %~dp0powershell.exe -File Build_01\sp_script.ps1powershell.exe -File Build_02\sp_script.ps1pauseHow do I stop the execution of the batch if Build_01\sp_script.ps1...

View Article
Browsing all 8411 articles
Browse latest View live