Quantcast
Channel: Windows PowerShell Forum
Browsing all 2562 articles
Browse latest View live

PS Script - Creating Multiple Printer Ports (Newbie Errors)

Mass Printer Port Creation Note: I'm a complete newbie when it comes to Powershell.  I haven't even touched it prior to this week. I need to create a bunch of printer ports (about 400).  I found a...

View Article


split on comma, but skip comma's for text encapsulated in quotations..

So I am using a simple split to split a string of text open.. $split = $output.split(",") My problem is that sometimes comma's are part of the actual data, in those cases it will be surrounded by...

View Article


Distribute a script to the Servers in AD

Hello, I am a newbie in Powershell scritpting. We have about 500 Servers with Windows Server 2003, 2008, and 2008 R2 in AD, and need to add to all of the servers a regsitry value to disble SSL2.0. I...

View Article

How do you execute a exe file in PowerShell that is saved to a thumb drive?

I need to run an .exe file saved on my thumb drive in this location E:\copypst\copypst.exe I have tried to use a few different methods cant seem to get it to work just right.

View Article

error of new-pssession -authenticate CredSSP

I ran the following lines on both the client and server. Enable-WSManCredSSP -Role client -DelegateComputer * Enable-WSManCredSSP -Role server Then the "new-pssession -authenticate CredSSP ..." command...

View Article


Solved - How to take ownership and change permissions for blocked files and...

Hello, I was trying to take ownership & fix permissions on Home Folder/My Documents structures, I ran into the common problem in PowerShell where Set-Acl & Get-Acl return access denied errors....

View Article

Monitoring Long Running Scheduled Tasks

Hi Everyone! I found a fantastic ps script that will monitor a long running scheduled task...the link is here: Original Script After a bit of tweaking, I got this running perfectly...but can only set...

View Article

Execute user input in ScriptBlock

So I am trying to get [1] this code to work. What I would like is to have is a script that, when run, asks for a command. I would enter the command I want run on the computers I specify, and the script...

View Article


PS Remoting - Failed to connect to an IPC port: Access is Denied

I am trying to configure some deployment steps in our build process.  This involves using powershell to remotely execute MSTEST.EXE.  The remoting works fine for things like {Get-Process} or writing a...

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

Direct un-buffered writes in Powershell

Currently I am trying to run a test that will power-down the machine abruptly when a file is being written. When power-down occurs the last part of data is not present as it is never flushed to disk...

View Article

Powershell Backup script, but leaves 12 files

I'm trying to get a backup script to delete ALL files older than 24 hours in a directory, but leave at least 12 behind. This for the case where backups stopped producing and we don’t want the last 12...

View Article

string and line question

Hi I feel confuse, soemtime, when I get attribute from AD, if i just echo $user.properties.name , it can display correct, but if i redirect to txt file,  it will become echo $tmp=...

View Article


DiskWriteBytesPersec in Win32_PerfRawData_PerfDisk_LogicalDisk is very huge

Using the following script, I found the DiskWriteBytesPersec is so high (the last column), and actually it is running on my laptop, so the result should be wrong, but what's the correct way to get Disk...

View Article

send mail on script failure

Hi Friends, I have a simple script which makes nw connection, copies files from source to destination & closes the connection. net use \\destinationpath\IPC$ "passwod" /user:domain\username...

View Article


winrm quickconfigu and connectionURI

Hi, I want to configure Powershell Remoting using HTTS. As a certificate i use a self-signed certificate. But I only get the errormessage 500 without any furtherr entries in eventlog. Is it possible to...

View Article

Scheduled Jobs, Receive-Job and results in Powershell 3

A job is scheduled to run at logon of the regular user, but using an account of the local administrator. The script is executed from the file and contains/produces errors. For example: *) Join-Path...

View Article


Measure scheduled task execution time on w2k3

Hi Do you have any suggustions to measure the execution time of each shceduled task? Thanks a lot. Best regards

View Article

XML parsing

Hopefully I an explain this all correctly. I am trying to read an XML file that is being generated from our servers hardware BIOS manufacturer (HP).  The xml output's member properties varies by...

View Article

FTP .net question

Hi, Have written some code today to get the contents of an FTP folder, so far its looking good except the string that is returned from the ListDirectory command doesn't appear to be something I can...

View Article
Browsing all 2562 articles
Browse latest View live


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