Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

How to use Powershell script to unmanage the multiple nodes

I am trying to use PowerShell script to unmanage the testweb5 and the testweb6 nodes in Solarwinds using for loop. I got something below but I am not sure of the syntax. Please help ...For ($i=5;...

View Article


Xml filter

hi Sir,pls,  have probleme to collect after filtering the items:count member:$Xcount = ($Xreconnect.reconnect.city | ? {($_.name -and $_.av -eq "BAO")}).count# filter:                    foreach...

View Article


Wrong encoding on PowerShell Invoke-WebRequest POST

I'm using Invoke-WebRequest POST method to send an text data. After sendingthetextin the post body is wrong.$postData = "žluťoučký kůň úpěl ďábelské ódy" Invoke-WebRequest -Uri...

View Article

Application Installation Using PowerShell

Hi All,Good Day to all. Iam new to PowerShell (just started using it)...Iam trying to install an application using powershell, but iam unable to get the status in text format (like installation...

View Article

How to get MS Office product key

Hello all, I would like to ask if is possible to get MS Office Product key from registry using powershell. I have one script which gets Windows Product key I need same think for office. Is it possible...

View Article


Adding text to multiple files

I'm trying to update dozens of different files with the same information and then save each individual file out to a different filename.  I'm currently doing this on a UNIX server but need to do it...

View Article

Need help with creating local user accounts from Excel spreadsheet by using...

Hello,I am new to Powershell and I am currently working as a coop student. I need to know the correct script of how can I read the spreadsheet containing user accounts by Powershell scripting. I don't...

View Article

Function for CRC16

HiCould any one post a function which generates a Hexa Decimal CRC16 Polynom 0x8005I have verified what would be the correct results with an online calculator.Data sequence : 123456789Result:BB3DI am...

View Article


Compare-Object fails due to way object looks from function write-output

Hi all, Ive made a function to test if a box has a SQL instance on it, ive finally it outting now to the pipeline and such using Write-Output, and it seems all good, I wanted to do a quick compare from...

View Article


Batch file execution with PowerShell Question

I run scripts in folders - Each folder(Build 01, Build 02 etc) contains a batch file that executes the ps1 file in that particular folder.  I would like to have a batch file that executes each ps1 file...

View Article

Make a variable runable

Tried searching the forum but I dont really know how to search for this, Sorry if its been asked.  Trying to make a variable as part of a script.  Very simplified example would be:$Command = Read-Host...

View Article

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


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

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


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

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
Browsing all 10624 articles
Browse latest View live