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

How to bring a prompt to User sitting on a laptop/desktop using Power shell...

Hi Experts,I am a novice in Powershell and trying to learn PowerShell.Currently, i need to reboot some 50-60 desktops remotely.i am using the below powershell command gc c:\Temp\machineList.txt...

View Article


[PS][Security][New-PSDrive]Reading cached credentials

Hello fellow scripters,I'm currently stumped on one question ...What I'm trying to do After connecting to a PSDrive (Filesystem Provider) using "New-PSDrive" with different Credentials I can read the...

View Article


Exception calling "Add" with "2" argument(s): "Item has already been added....

Hi, could someone explain this error to me, script segment works, this is just odd.Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: ''  Key being added:...

View Article

Using Powershell to check Outlook 2010

I have a powershell script I used a while back for Outlook 2007, it read emails, wrote them to a custom event log, and then deleted the email. I'm trying to resurect this script to work with outlook...

View Article

How to find system memory in Windows PE.

Hi,I have written a batch script that runs after WinPE 3.0 loads, which counts the number of POSTs and writes it to a txt file on A:\.I have added a few more lines to also read the available memory on...

View Article


How to force group policy update remotely in a bunch of desktops(computers...

Hi,I want to force group policy on a collection of computers remotely.The name of computers can be stored in a text file.By using this info. (about computer names) , Could you please guide me writing a...

View Article

Auto add mount points and Add Cluster Disk to Cluster Manager

Hello,Could really use some assistance here.  We are moving all of our hardware from 1 data center to another data center using SAN replication.  At the destination, the SAN admins are going to be...

View Article

Get-ADUser not returning MemberOf for some users

I am using a basic powershell query to obtain a user's group membership:(Get-ADUser -Identity JohnB -Properties memberof | Select-Object MemberOf).memberofThis method works great for most users, but...

View Article


passing keystrokes into batch file

I need to execute a batch file, with the following keystrokes to be passed during its execution:yenteryHow do i simulate the above 3 keystrokes into the batch file?Thanks

View Article


how do I write this PS script on vbs?

I am not a vbs scripter at all.  I have this code I've written in PowerShell that works perfect.  The problem is it has to run on Windows XP machines and none of our XP machines have PowerShell...

View Article

Adding an additional column to output

Hi guys,Can anyone help with the following?I'm currently trying to output to a CSV which will include a users SamAccountName, CurrentHomeDrivePath, and a third column with a NewHomeDrivePath. So look...

View Article

wmic to change dat time format

Hi,can i change the format to normal date time when query the CreationDate in this line "wmic process where name="ProcessName" get name,CreationDate" i need the script to be in single line and not to...

View Article

get-wmiobject win32_product continue on error

Hello,Looking for some advice. The below code checks remote servers obtained from a VMware host, but unfortunately if even one of the servers fails the whole output fails.   I would like it to skip any...

View Article


Performance of .ps1 vs. .psm1

Are .ps1 files containing script-based cmdlets parsed/DLR'd every time they are executed? I'm seeing a huge difference in performance between a function in a .ps1 vs. a function in a .psm1 that...

View Article

Possible datatype issue?

I'm running into a problem with a powershell script and I think it may be datatype related but am not sure. I would appreciate any suggestions for fixing this.The following line of code when run againt...

View Article


the woes of optimization

$form = New-Object Windows.Forms.Form $form.text = "Chess Bored" $form.size = New-Object Drawing.Point 625,725 $x = 25 $y = 25 $label = @() #array For($i=0;$i -lt 8;$i++) { For($j=0;$j -lt 8;$j++) { $x...

View Article

Draw-ADSecurityGroupNesting

Hi Support,The script under http://gallery.technet.microsoft.com/scriptcenter/graph-nested-ad-security-eaa01644 does not work for the DN except the users container, if we run the...

View Article


Combining get-user and get-mailbox to get all email addresses for a user

HiI need to knock together a list of all mail enabled users and their associate settings from their AD account (company, department, title, city, all that stuff). I need to include *ALL* their SMTP...

View Article

cmdlet with Multiple output objects

Hi, I'm building a script that uses the PS4.0 cmdlet: Test-Cluster.In the documentation (http://technet.microsoft.com/en-us/library/hh847274.aspx )  I found that it has 2 output objects;...

View Article

ports for WinNT provider

Hello All, i would like to ask you, which ports are needed when I am conntecting to WinNT provider in VBS script? i tried to figure it out, but without sucess.

View Article
Browsing all 15028 articles
Browse latest View live


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