Script to monitor IIS memory consumption and url
I have 2 scripts running to monitor IIS memory consumption using "get-process" and the IIS web requests using "get-webrequest" at the same time.I would like to try and combine these 2 commandlets to...
View ArticleInvoking a powershell command as a variable reference with a parameter list
I'm trying to embed a powershell script into the jenkins CI tool. The script location is a variable and one of the parameters is a variable. I having been trying all sort of combinations such...
View ArticleHow to Find .Net Version Installation
Hi All, I would like to find which .Net Version is installed on a Computer. Could you please help me with a Powershell script on how can i get this Output.
View ArticleSum one column based on another in PowerShell array
I've got a custom object retrieved from a SQL Query which looks like thisThis is basically how I've constructed the object and it works fine but I can't seem to find how to group them.foreach...
View Articleconvert 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$_.LastWriteTime format different for Write-Host & Write-Debug.
Windows 7, PowerShell v4.Get-Culture = en-GB, Get-UICulture = en-USApparently I cannot change the UICulture to en-UK, to which every other setting in Control Panel is set.So can somebody please explain...
View ArticleSearch for a file and if it is there output the content, if it is not output...
I am looking to search for a file on a list of computers (Computers.txt) and if the file is found I would like the content (it is only 1 line) to be sent to a text file with the computer name and then...
View ArticleChanging DPI
Can DPI be changed using powershell?I found a document on how to check the current status; but I need to be able to change itGet-Item -Path Registry::'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows...
View Articlebypassing drive isolation in powershell
how can I bypass the drive isolation that powershell has? I have a removable media drive that will not show that it is mounted in powershell, but shows mounted in windows explorer. For this portion...
View ArticleGetting default account information
Hi,I have been searching the web for a solution to get the email address of the default email account in outlook. I want to have a scipt that i can run on the client...(Pop3 and Exchange)I have not yet...
View ArticleSearching for files less than 1 day old
Hi all,I am trying to get all files from a folder that are 24 hours old or less.Its currently pulling all files in the folder, from months ago, but i only need files from the previous 24 hours onlyCan...
View ArticlePowerShell Newbie and Remoting Issues
I have read chapter 13 of the :Month of Lunches" book, and I have a pretty good understanding of the "Remoting Concepts" however I would like a bit of clarification from an expert. I have a "HomeGroup"...
View ArticleRedirect StdOutput failure 2>&1
I know I saw a video once on this but I don't remember what the trick is when using PowerShell. PS T:\> Get-Service -Name UPS 2>&1 C:\scripts\outputx.txtGet-Service : A positional parameter...
View ArticlePowershell.exe As Elevated?
I am running a command from the run line on the start menu, but when it runs the script, it says:Warning: To preform some operations you must run an elevated Windows PowerShell console. powershell.exe...
View ArticleUpdating a specific value of an array with multiple entries
Hi,I'm looking for a way to update an existing array.I have a PSCustomObject that I gather in an array$x= [PSCustomObject] @{ Source = "" Target ="" XD = "" ID = ""}$arrX += $x... Array looks...
View ArticleRegister-WmiEvent -ComputerName vs Remote-PSSession via Invoke-Command
Hi PowerShell experts! I am currently creating a PowerShell eventing script that will be registering events on my local computer and monitoring win32_service and the __InstanceModificationEvent on...
View ArticleNew object from existing object
Hi,I'm trying to create a new object from an existing but so far i can only create a pointer to an existing object.$a=New-Object'object[,]' 5,5$a[0,0] = 10$b=$a$b[0,0] = 9$a[0,0]$b[0,0]This is not...
View ArticleIncluding Task result in the output
Normal 0 false false false EN-IE X-NONE X-NONEHi All, I am running this script on a daily basis and getting the correct output. Is there any way of getting the below script to include the task...
View ArticleUsing -FILTER option
I am trying to filter out A records in DNS using the following line but want to add a second value to the -FILTER section - Get-WmiObject -Class MicrosoftDNS_AType -NameSpace Root\MicrosoftDNS...
View Articlerun two commands simultaneously
is there a way to run commands simultaneously (asynchronous)? For example:I want to run 'get-mailbox -resultsize unlimited' and 'get-contact -resultsize unlimited' at the same time, rather than waiting...
View Article