Check if Computer object exists in AD ?
I have a text file containing 100 server names. I would like to push these into a script and test wheather the computer object exists or if it has been decommissioned (deleted). From the results i can...
View ArticlePowerShell - Email notification for failure of batch
Hi I am new to PS.I am executing SQL scripts via a batch file. PowerShell correctly exits the batch when a script fails. When that occurs I would like to send an email, or if no error occurs send...
View Articlereceiving error when running this script:
HI there,This is the script i'm trying to run so I can update mulitple user's company attribute:import=import-csvc:\import.csv foreach($userin$import) { $Name=$user.name $Company =...
View Articlewin32_product not returning anything
Hi!Just started to learn powershell and I think I'm loving it :-) Anyways, trying to make a script to determine what roles are installed on a server. And if the roles are missing then install them.I've...
View ArticleMove and rename a lot of files
I need to do a daily sweep of a folder to see if any file(s) have been put into it. If there is a file I need to move it to another location and add the current date and time to the original file...
View Articlepowershell script for assigning \changing ownership of a shared mailbox
Can someone please tell me shell script for assigning or changing ownership to a mailbox ?!I am new to powershell, I have to update ownership of 200 shared mailboxes and would really prefer to run a...
View ArticleAnd a new member to an existent array
Good morning,Here i have a little script I wrote.cls$Date_Time = $(Get-Date -format g)$Computers = Import-csv "Computers.csv"$File = "Exported_File.csv"$report = @()foreach ($Computer in $Computers){...
View ArticleAdding to a CSV in a loop
I was trying to throw together a quick script earlier to watch the resource use of some IE instances on a machine. I needed the script to keep logging until I told it to stop. Rather than just...
View ArticlePowershell and Scheduled task
I've a command file that starts a powershell script. This command works fine when I run it in a command box on a windows 2008 R2 server. I can see it because it create a log file.When I add this...
View ArticleAppending to a Displayname in Exchange 2007
I am trying to append ***Disabled*** to 387 user's Displayname using the import-csv command. The csv contains Displayname, Alias. Any idea on how i can script this so i don't have to do it individually?
View ArticleNeed help to Invoke complex cmd File on remote Computer
Hello,The Problem:In our Domain we use Matrix/Empirum to Deploy Software/Images/Patches etc.In the last 5 Month´something went wrong with the Inventory Function of the Program.To Force an Update of...
View ArticledestinguishedName
Ich search a possibility to extract only the OU part to the excel table. I usedName,@{name="OU";expression={($_.DistinguishedName -split",OU=")[1] How can I get all OU to different cells in a excelsheet?
View ArticleTrying to populate a CSV with drive info
Hi All - this seems so simple, but I cannot seem to get the output from this tiny script to show up in a CSV like it does on the host. I know I am looking at an output formatting issue, but that always...
View ArticleRestart server & then email
I am trying to write a script to restart a server and then email when the restart is done.I started with this basic command: Restart-Computer -ComputerName <string[ ]>,But I can't get it into a...
View ArticleScript to Create OLEDB Connection
Need help in establishing OLEDB connection to the database, i am using the below script to connect to a oracle database, When i run the script the output is not showing all the records/ data. Enclosed...
View ArticleQuery AD using Powershell for data in a csv file
Hi All, I am new to the Powershell. I have a csv file that has names of the users in it. I am working on a project and I need to have a script which can take input from this csv file and provide me the...
View Articlefilter the event message output
I have a small script below and need to know how to truncate the output of message field to show onlyNew Logon: Account NameNetwork Information: Source Network...
View ArticleParameterizing Scripts
I am just learning the art of "Tool Making" Don Jones book, chapter 4. I am posting this code for review and I hope it passes the formating industry standards, if not tell whats wrong and I will surely...
View ArticleFile migration
Hey all. I am looking to separate some files for a mail migration. We have several PST files per user that are grouped together in each user subfolder. We need to separate the PST files based on...
View ArticleGet-Counter is not working on remote server with different credentials
Get-Counter is not working on remote server with different credentials.
View Article