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

PowerShell Script for complete folder upload

twice a week a folder is generated with pdf files inside, each folder is named with an ID number(Ejm  ID523869) and the .pdf files named with a serial number(ejm 22081300340), each time a new forder...

View Article


Importing CSV successfully, getting error "ConvertTo-SecureString : Cannot...

Trying to come up with a script to create an AD account and assign a password from a .csv file. When I run the script, I get the error "ConvertTo-SecureString : Cannot bind argument to parameter...

View Article


Powershell script for adding ACL rights

Hi, I've two DC's, on W2k03 and W2k08, maybe 500 domain user account. One OU is dedicated for all testing. Into that OU we have sevelar sub-OU's. All users must have added specified security group into...

View Article

SSH HostKey Fingerprint

Hi I am using the code below for SFTP upload to a SFTP server using WinSCP assembly. My code is running on Windows Server 2008 R2 Standard. This code has a line that asks a value for...

View Article

Change password for users from csv

Hi all!The management of my school asked me to reset all the passwords of all the students with a new password, which is provided in a CSV file. I'm not great in PowerShell, so can someone help me...

View Article


QueryBuilds Performance Question

Hello,My PS Script works fine, but the performance for one query is not so good, becuase there are a lot of build in the project collection.My script is this one:cls...

View Article

Send-MailMessage gives a strange error message

Hi OS: Windows 2008R2, Hyper-V editionI have powerShell scripts running for a long time on several Hyper-V servers. Suddenly I get this on one of the servers when Send-MailMessage is executed:Unable to...

View Article

creating custom classes & attributes using powershell

Hi all,I am running AD on windows server 2012. As required by an SAP application, in AD, I need to create a custom group calledtaxgroup with 2 custom attributes called technicalUsernameand...

View Article


Can I use a DATA Section contained in an external file? e.g. in a psm1 module...

In Powershell v2 I am trying to use DATA Sections contained in a psm1 file.I can get it to work if I use the DATA Section within the main ps1 Script file:## Code Write-Host $testDataSection ## Code...

View Article


powershell find text and sort output

Hello,I'm trying to find some text and sort the output. The problem is that I can't find a way to output only what is need it. This is the command line.Get-WindowsImage -ImagePath...

View Article

Get-ADuser Same Forest Cross Domain Search Fails

Hello!          I'm looking to copy AD attributes from one object in domain A to another object in domain B. Both are in the same forest and there aren't any permission problems, but I'm struggling...

View Article

Get list of OUs then use in -Seachbase

Hello all,There seems to be a couple of ways to obtain all OUs with "something" in their name - in my case I'm seaching for all OUs called "XP" and then my aim is to discover if these OUs contain any...

View Article

CSV return value

$file1="D:\file\input.csv"   $profile = Import-Csv -Path $file1 -Header ID,ORG,CUSTOMER,Name The value of ID,ORG,CUSTOMER,Name are in the csv file.$profile.ID doesnt return any value. Any idea why? 

View Article


Freespace Powershell Advice

Good AfternoonI recently downloaded the below script from this microsoft scriptcenter area (http://gallery.technet.microsoft.com/scriptcenter/disk-spaces-in-your-df94e274/view/Discussions#10216)However...

View Article

Access denied when remotely trying with Get-NlbClusterNode

When I locally, on the SMTP Cluster run this command:Get-NlbClusterNode I get the output I need.But if I try the same from a remote server (same network and domain) I get an:[smtp-s001a]: PS...

View Article


Powershell | WGet in WinPE via SCCM TS

Ok this is a fun one I could really use some help on.We are trying to get SCCM to re-partition empty disks for bare metal installs. However there is a problem, you must pipe in a text file toDISKPART...

View Article

Remove ACL Issue

Hello All,I was simply looking to remove the builtin\users acl from a network share and my logic - as far as I can tell - seems to be correct in the script that I wrote for it; I don't receive any...

View Article


Excel - Change Data Label Font Size

I have the following code in creating an Excel chart in Powershell,  how can I change the Font Size for the Data labels ?$workbook.ActiveChart.ApplyDataLabels()  turns on the Data Labels,  but how can...

View Article

Querying GetDnsServerSourceRecord.RecordData / CimInstance#Instance data in...

I'm trying to query the RecordData property of a zone I've retrieved using Get-DnsServerResourceRecord. If I query any of the other elements things work fine, so for instance I can run...

View Article

Powershell vs IE F12 Developer Tools

Why can I not acess the DOM of frames with PowerShell, but I can through F12 Developer Tools?document.frames[0].document.getElementById("expample").innerHTML "Page Content"$ie.document.frames -eq $null...

View Article
Browsing all 21975 articles
Browse latest View live


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