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

Adding members of various groups to another group - duplicate entries

I need to add members of various groups to a new group. Adding just the groups themselves as members isn't an option as the new group is a distribution list that we'll be using essentially as a...

View Article


For loop problem with server list acquired from get command

When I run the cmdlet Get-CMDistributionPointInfo | select ServerName to get a list of SCCM distribution points (DPs) by itself, I will get the following results example in the Powershell console...

View Article


Assign static IP for domain user in dial-in tab

Hello,I'm trying to make a script which create a domain user using specific properties.My issue is that I can't assign a static IP for the user under dial-in tab and couldn't find any useful...

View Article

Retrieve errors from excel file using PowerShell

Hi All,I have 8000 excel files(contains logs) in a folder. From these files, I want to pick the rows which having error under error column and write these  into a single excel file. I'm trying with...

View Article

Upgrading Powershell to 5.1 - issues

There is requirement to Upgrade to Powershell v5 and remove all v2.1.  We have machines with Server 2008 R2 with Powershell v2, we have successfully upgraded to v5.1 but still we get " Windows...

View Article


Loop in continue to check if my network cards are UP

Hi,I would like to create a script (a continue loop) to check if my networks cards are always UP. How can I do it please using : $NIC1 = (Get-NetAdapter -Name "NIC1").Status $NIC2 = (Get-NetAdapter...

View Article

Running a Get- command after a command results in the command failing

Hi AllSorry for the misleading title. I am having a issue in developing a script that grabs computer data. For now, I am testing it on a local machine and I am having the following issues when I...

View Article

Bulk change the primary/reply-to domain in Office 365

We are rebranding our company and therefore changing the email address displayed on outgoing emails.  I know how to change it for one user.  Is there a way to change it for all users at once?  We also...

View Article


Powershell Unable to run Invoke-Command - OpenError:...

People,I'm trying to run the below Power Shell script to get the list of servers (Windows Server 2008 and 2008 R2) that is missing some updates installed:$SearchBase = 'DC=Domain,DC=com'$ComputerList =...

View Article


Start-Process call file from the same folder the script is running from

Hi allI am using deployment system to deploy this to files to remote computers.1. Restart.exe2. RestartScript.PS1The destination folder on the remote computers is inconsistent and can be different for...

View Article

Remove header from output of pipeline

I am trying to get the update time of the most recent .vhd in a folder.  I have: get-childitem "*.vhd" | sort-object LastWriteTime | Select-Object LastWriteTimeMy issue is I am trying to get rid of the...

View Article

Powershell output in Exchange Management Shell differs from Powershell

Hey guys,Didn't know where to put this but here goes. I'm running a PS script to add IP adresses to a receive connector. However, it seems that the output get's cut off once in a while, this is vague...

View Article

setting msExchHideFromAddressLists and ShowinAddressBook

Hello all,I'm trying to hide Contact objects from the GAL by setting the msExchHideFromAddressLists and ShowinAddressBook attributes, and I'm having a bit of trouble. My code performs a domain search...

View Article


Adding values to AD fields via Powershell

Hi GuysI would like some help with something i am trying to achieve. Basically I will like to have a script which will check the value on the Telephone Number field of an AD user and then add the...

View Article

acl access rule

I've seen a number of examples on the net on adding ace's but I can't get any of them to work.$Sid = (Get-ADgroup dnsadmins -Properties ObjectSID).ObjectSID.Value $AccessRule = New-Object...

View Article


Foreach is creating a Loop in my script

Hi i have an sftp powershell script that is using winscp to send files to an sftp server.But i also created a back for the files and mail if it did or did not go true.The problem is that my scripts...

View Article

Copy multiple files

Hi Experts, Am trying to copy multiple files in the $finalfile variable but receiving the error '@{FullName = D' doesnot exist'The script is working well apart from the For Each copy part. Please...

View Article


How to configure network parameters via an XML file and call it in a...

Hi,I would like to configure 5 VMs, more precisely the network parameters defined in an XML file, via a PowerShell script running from the Hyper-v host and calling the XML file.How can I do it please...

View Article

Powershell Form processing order of operations for RichTextBox

Hi there, I'm using a form to query information from AD and return the data into a RichTextBox. That all works fine but I have three queries. The data is returned fine if I only use a single computer...

View Article

Remove-Item command for all window profiles

I wanting to delete all files and folders from the desktop under all window profiles. I also want to keep a few .ppt that have specific names for under each profile.  Below is what I have tried and...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>