Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

The specified path, file name, or both are too long

HiHoping someone can help, I've been running a script to delete files/folders and it's been running great, however recently some of the folder names have become very long and the script cannot delete...

View Article


Input parameters not available when calling powershell script from VBA

Hello. I am having some issues when calling a PowerShell script from within VBA. The issue seems that the input parameters to the script do not seem to have a global scope as they do when you call the...

View Article


Limit to the length of an array

I'm building an advanced function to parse the security log. It seems when I add a 23rd element to my array $list, the script breaks. As long as I stay at 22 or less, it works. Below is the guts of my...

View Article

Powershell and WSUS - Get-WSUSClient - possible bug?

Tim here...I am attempting to write a script that looks at my Active Directory for specific OUs where I have Policies set to run Windows Updates. I have everything working as I would want.  My issue is...

View Article

Check a valid DATE format

Hi, I tiring to check if the user input is valid DATE format DD/MM/YYYY and it's not NULL,I tried to use "TryParseExact" command but I get error:"TryParseExact : Cannot find an overload for...

View Article


Send an email from link

HiDoes anyone know how to create a link in an html file to send an Outlook email.I'm trying to create a link in a report so the user can just click on the link to send an email.Thanks

View Article

run a command with anther user credential

Hi, I wrote a PS script that ruining a command that deal with user email.I have the admin privilege for running this command.By default the mailbox user owner and the exchange admin have privilege to...

View Article

Best way to install roles and features in server 2008 r2

Hi All,I want to install below roles in server 2008 r2. I use import-module servermanager, add-windows feature myroles_and_features. Here are the roles and...

View Article


Replacing part of a element in an Array

HelloI woundered if someone could please give me some advice on the following.Is there an easier way to achieve the following$b = $null$A = "AXA","BZB","CYC"foreach ($element in $A) {switch -wildcard...

View Article


List the ARP(Add or Remove Program) entries.

Is there any cmdlet or any other way through powershell to get the ouput of what ARP display? Puneeth.

View Article

Question about -Split

$String = @("asdf asdf hijk Database:001 asdf:45545 asdf asdf:4554 Database:101 hijk""asdf asdf hijk Database:301 asdf asdf asdf asdf:4545 asdf asdf Database:011 hijk ")Select-String -InputObject...

View Article

Very Old FTP, Need Password Encripted

We have a very very very old mainframe here and the FTP that can pull from it is also old and I need to pull a couple of files from it on a daily basis using PowerShell (PS.) This is not a problem,...

View Article

reading values from xml

 </TaskHeader>  <TaskDetails>    <Item MailboxName="lior test">      <Source>        <Identity>ysds.co.il/Users OU's/HQ/Marketing/lior test</Identity>...

View Article


View installed updates.

Hi,In powershell is there any cmdlet or any other way to list all the installed updates on a windows 7 PC. I have tried Get-Hotfix but it not giving the total list of updates installed on a PC.

View Article

not finding new-symlink cmdlet error

I have installed:powershell 3.0 on my server 2008 R2 serverthe corresponding v3.0 pscx community extension module which includes the new-symlink cmdletI'm running a powershell script under a service....

View Article


Call a 2nd PS, as another user and bring back paramters

Hi I'm new to PS, but not scripting in general and am trying to create a script to automate our Win7 build process.For various reasons, the machine will be built off the domain, then join itself to an...

View Article

Parse a text file

Hi Guys,I have to parse a text file with recurring informations from different items. Looking like this.Slot #1Servername: SRV00001Type: BladeModel: DellSlot #2Servername: SRV00002Type:...

View Article


Replace usernames from mapping-table.csv

Hi.I have several text-files with different usernames that has to be replaced according to a mapping-table.csv file. Does anyone know of a nice script to use?Best regards Trond

View Article

Printing to TIFF Conversion then verifying file has printed.

Have a script: Function Printfiles{ param ($dirfiles, $log) foreach ($file in $dirfiles){  #Printing each file in Blackice Dir  $file | Out-Printer }}Function ValidatePrinted{ param ($dirfiles, $Efile)...

View Article

Code signing error

Dear Sir,               I used a script to sign scripts.                 Following is the script I used.  ## sign-file.ps1## Sign a fileparam([string] $file=$(throw "Please specify a filename."))$cert...

View Article
Browsing all 10624 articles
Browse latest View live