Quantcast
Channel: The Official Scripting Guys Forum! forum
Browsing all 15028 articles
Browse latest View live

Get-Mailbox -Database and Format-Table questions

Hi, I've written a script that will get the number of mailboxes on each database on our exchange server and then create a report and email it to everyone. This is the first script that I've ever wrote...

View Article


Comparing two csv's and the columns within

Hi,I have two csv's which I need to compare.csv1col1, col21000, 011200, 021200, 041400, 051400, 06...............csv2col1, col21200, 041400, 05I need to do a comparison between these two csv's such the...

View Article


Getting Powershell to Execute with elevated credentials without run-as

I have code that is being invoked by a third party program. Unfortunately, it does not allow for the use of elevated credentials to run this script.I was told the best approach is to have the third...

View Article

Cannot Convert type

I am attempting to pull the manager of a user from AD and then from there pull a list of that mangers direct reports (users 1's peers).$a = Get-ADUser user1 -Properties Manager | select Manager gives...

View Article

Change Service Account Username and Password Locally w/Powershell

I found this article:http://gallery.technet.microsoft.com/scriptcenter/79644be9-b5e1-4d9e-9cb5-eab1ad866eafBut it only works if you run the script remotely...even if you change it so it can be run...

View Article


Advanced Function Parameter

Hi all, I'm trying to write this function to get information about a computer object for me, but I'm hung up on how to make it do it. The following is what I've got so far. function...

View Article

If/Then statement based on group membership

I'm using a powershell script to automate signature creation from a word template.Currently the script finds all the ad info, like name, cell phone, address, etc and adds it all to the signature.I am...

View Article

Adding a security group for members when containing the same attributes...

Im looking for a way to add multiple contact card objects in AD to be members of a specific security groups when they contain specific "employee id" attributes values which are extracted from another...

View Article


PowerShell: Reusable Custom Object?

$out = @() $base = New-Object PSObject -Properties @{ 'Name' = '' 'Version' = '' 'Foo' = '' } $one = $base $one.Name = "test" $one.Version = "1" $one.Foo = "bar" $out += $one $two = $base $two.Name =...

View Article


Search CSV file

Can someone help me with this.I have a variable "pod-08-cha01-bl6", I want to search the SP Name column in CSV file to find the cell that contains this variable and import this row (in this example 4th...

View Article

Powershell: SCOM and maintenance mode duration / ...timezone?

I've got a bit of PS code that will take a computer name, and put that computer into maintenance mode. The server is going into MM, but the duration is off (sometimes by a lot) and, when I use a...

View Article

Major Batch Issues

Hello All,Previously, I had this .bat that ran perfectly and did everything I needed it to do. When I image a machine and join it to the domain with a random name, I then run the .bat you are about to...

View Article

xcopy CSV file includes destination path help

Hi everyone!I have this code that actually works well:for /f %a in ('TYPE copy.csv') do copy %a "C:\Path\One\"The problem is that is very time consuming due to having several folders to copy to.I need...

View Article


UCS PowerTool - Adding management IP address

Hi A question about UCS PowerTool I tried the following command but the command cant find the service profile, and thats because the service profile is not under root, its under a sub-organisation...

View Article

Moving a large number of files in one directory to multiple directories in VB...

I need a VB script script to move about 60,000 files and splitting them up so that there are 300 files per folder. Please give me some sample script to do this task. I am pretty new and don’t know...

View Article


CTSFileExistingMonitor1.vbs(144, 7) Microsoft VBScript compilation error:...

Hi All, I am trying to modify the script since file placed under C:\folder will be 2 hours older file. For example at 10 AM the file name will be log-data-29-08-2013-08.log and at 12:00 AM the file...

View Article

Start-Process not working with blank spaces in path

Hi,I've actually a problem with the "Start-Process" command , used to run an exe file located in a path containing blank spaces. $myPath = "C:\Temp\My folder with spaces\setup.exe" Start-Process...

View Article


Script to revoke rights of users on C drive

i have a script which makes C drive inaccessible for domain users and give full permissions to administrator and system. This script i am applying to system via group policy. I am applying the script...

View Article

Converting newline sequence doesn't change last line's newline.

I just can't get this to work quite right. Hopefully someone can tell me why.... or offer up a different (better) method that works all the way through the last line.I'm using a small script to convert...

View Article

Image may be NSFW.
Clik here to view.

Script to re-map network drives that become unavailable

Trying to find a vbscript on how to re-map all network drives with "unavailable" or "disconnected" status.Verena Tay

View Article
Browsing all 15028 articles
Browse latest View live


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