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

How to remove @domain.com from each cell of Excel using PowerShell?

Hello,For e.g. below is my First.CSVDisplay Name        UserPrincipalName                   -----------------------------------------------------    Apple Fruit            Apple.Fruit@domain.com...

View Article


how to get value of $_

I have a test CSV file where the contents are as follows:ID -> header99999 -> valuethe actual CSV will have more values.I want to loop thru the CSV and get the value pointed to by $_ using this (...

View Article


How to clone treenode?

How to duplicate/clone treenode to another?I have build treenode from Actice Directory OU structure to $treeNode1 variable. Now I want to clone it to $treeNode2 variable but I do not know how. Cloning...

View Article

How to run fuction as backgroup process?

How to call/run this function as background process?***************** function GetText { param ([string]$target) if ($target -eq "FORM") {$line = "rFORM"} else {$line = "rREPORT"} return $line }# call...

View Article

Us Get-ADUser to list output of disabled users in an OU to a .CSV

Hi,I am trying to get a list of all users in an OU that are disabled and list the following two attributes for those users in a .CSV file. SAMAccountName and EmployeeNumber.I have the following so...

View Article


interprete char as int

Hey,I created an array like the following:$Nums = @('1','2','3','4','5','6','7','8','9')I know this is an array of chars. That's what I want because I do some more stuff with this array. (I could do...

View Article

Create folder in Outlook and move contents to it

Hi allWe have Outlook 2003, 2007 and 2010 and Exchange 2003 and the followingWe need to create a folder in Outlook called "whatever" and move all the contents of the Sent Items folder into the folder...

View Article

Bulk update of AD users properties

Hi, I have Windows Server 2008 R2 domain/forest functional level. My company is undergoing a major reorganization so every employee has changed it's title, department, . . . so I would like to modify...

View Article


Automating user management

I need to automate the following task:I receive regularly a SAMName list of groups which varies between 10 to 30.I want to check if each group exists in the main domain, if it exists I need to check...

View Article


How to force overwrite without a prompt?

Hi I am using the code below to download files from an FTP server but it is prompting for each file to overwrite. I tried using -force and did not work. Is there another command I need to...

View Article

Use Powershell to check whether and AD user exists

We're trying to clean up roaming profile folders, and as part of the task I need to check whether the user actually exists in AD.  I have tried 3 different methods and so far none of them work.Either...

View Article

How to compare local and remote directory files and download changes via FTP?

Hi,I am using the code below to download files from an FTP server. Is there a way I can have it check the remote directory and compare it to the local directory and download the changes? Like compare...

View Article

Powershell/Powershell Studio 2012 - Help with Global Variables!

Hello,I tried searching through the forums and Google, but could not find what I wanted, but if someone knows of a thread/article, please post!Problem:  In Powershell Studio 2012, I would like to set a...

View Article


add-member wont allow secondvalue noteproperty

I have the following script which works fine.  Import-Csv c:\TPR_TEST.csv | ForEach-Object -Begin {    $UPC = @{} } -Process {     $UPC.Add($_.UPC,$_.TPR_Sales) }Import-Csv c:\HQ_TEST.csv |...

View Article

How to use function inside background job?

I try to call function inside job. It does not work. Is it possible to use function inside job or not. I hope you can help me. Here is my example code.Start-Job -Name ForestJob {param($v01,$v02)  $line...

View Article


Remove shared calendar permissions

I have successfully followed another post which added permissions to view calendars of other users in an Office 365 environment.  I now need to clear out these permissions from 60-70 email addresses....

View Article

which wmi class to check disk status

Hi,Which wmi class do I use check the foreign disk status?Thanks

View Article


CSV Comparison and Create CSV with Differences/Deltas

I have a powershell script that runs once per day that generates a csv file with a list of all mailbox users, and calendar access rights for thier mailbox.  This csv contains 4 columnsA=Mailbox B=User...

View Article

script to query security groups for their membership

command:Get-ADPrincipalGroupMembership -identity "security group name" |select namewith this command I can get the membership for the security groupbut I need to run this command for all security...

View Article

Add a property to machine config

I need to make a change on all our IIS servers. so I would like to script it.Here is what  I need to do:In web.config find the <system.web> section. Addthe following line<deployment...

View Article
Browsing all 21975 articles
Browse latest View live


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