Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Need help with inherited powershell code

Hey all so I inherited this code at work. It is suppose to get information for desired computers where I work. However some of the things it tries to pull doesn't always work. The main one is the mac...

View Article


Robocopy Error 3 (System cannot find path specified) and Error 5 (Access...

So I am really new to Powershell and just yesterday learned about Robocopy.I have been trying to find a solution to this problem:I wrote a script in Powershell that is to simulate a "Backup". It...

View Article


Mapping network drive using PS V3.0 New-PSDrive -name "K" -PSProvider...

Hello,I am creating a simple PowerShell v3.0 local logon script for all who logon that is running on W2K8 R2 SP1 server to map a persistent "K:" drive to a remote AD domain W2K8 R2 SP1 file server (no...

View Article

More classes needed using get-wmiobject

HiI have been able to get some good information out using get-wmiobject, but I've run out of ideas.  Can anyone add to the list I have below to help me describe the machine.  Please note I want to...

View Article

get-command/show-command error: Object reference not set to an instance of an...

I have started receiving the following error when running either the get-command or show-command commandlets in powershell v3.0 PS U:\> get-command get-command : Object reference not set to an...

View Article


Get-WMIOBJECT GUID

HiI'm trying to get the GUID information from my machine, but I don't know the script to get it.  Can anyone help?ThanksNicktay

View Article

Form and Progressbar

Question 1:I created a form. After click button on it to run script, the form cannot be dragged or moved until the script finished. Is there a way to move the form around while script running?$Form =...

View Article

Update-TypeData: how to make NoteProperty read/write?

$obj=New-Object -TypeName datetime $obj|Update-TypeData -MemberType NoteProperty -MemberName Probability -Value 100 $obj.Probability=0 # Error! How to make it read/write?

View Article


Powershell Memory Usage - Leakage?

Hi,I am having an issue with a long running powershell script with a the memory increasing over time, like a leak. I am creating collection variables but after doing a connection to sql. Later on I am...

View Article


Handling plan_handle with varbinary data type in PowerShell

Hi,I have a problem handling a varbinary column in PowerShell.I am reading up some plan handles into a dataset. The plan_handle is varbinary(64) in SQL Server. Then I am trying to call a function in...

View Article

Search Computers object in AD based on its description using PS

Hi everyone,How can I enter a search string and it will search all AD computers with that string in computer's description attribute using PS.  I am trying to search a computer with a specific text in...

View Article

Processor information using get-wmiobject

HiSuppose there is more than one processor in my machine, can anyone give me a script which show me a breakdown of the processors and their varying speeds/a distribution of resources between the...

View Article

Active Directory Module for Windows Powershell Output Results as Excel document.

My current issue is that i am trying to find all expired accounts under my OU in Active Directory. The current script i have runs great but i dont know how to be more specific or to get the results to...

View Article


When Value contains multiple values convertto-html will return...

What I'm trying to do is build a function to pull networking values from some ESXi hosts. The function works correctly, but when I try to convertto-html values that contain more then one entry returns...

View Article

Read in specific line numbers from a text file (very large 1.5GB) using...

Hi all,I have a large file (a text file) which is over 1.5GB in size.  I need to read in specific line numbers from the file, I have a list of exact line numbers I wish to read.If I use "get-content"...

View Article


Powershell against wim images

Hello there is there a possibility to use powershell to recover additional infos about wim/mounted images? I know that there are DISM Cmdlets and the DISM utility by itself (i use them normally) but...

View Article

Error while adding local user to a local group through powershell

I used the following command to set the password and add a group to the user :$user=[ADSI]'WinNT://localhost/account5'; $user.SetPassword('Passw0rd#'); $OBjOU...

View Article


Error installing both PowerShell 3.0 and 4.0! Anyone?

Relevant System Information: Windows 7 SP1 - 64-bit .NET 4.0 and 4.5 both installed System currently at PowerShell 2.0I have tried running it with the System Update Readiness Tool but it didn't change...

View Article

Select-Object: why -Unique is not always unique?

An example where -Unique is unique:'a','a','a' | Select-Object -UniqueAn example where -Unique is not unique:Select-Object -InputObject 'a','a','a' -Unique

View Article

Parse Windows login event for specific details

Hi,I have a windows event that I want to search for in the event log using Powershell.  I've got the basics but can't find how to drill further into the details.  This is what I have so...

View Article
Browsing all 21975 articles
Browse latest View live