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

How to add or append the notes in telephone tab

HiI have below script to update the notes info in Telephone tab of AD User properties. But through this, old info replaced and only show the new one.Import-Csv .\script\userlist.csv | foreach...

View Article


quota management

Hi all, I'm trying to script storage quotas on a windows 2012 server. I am running the console as admin but I get the following error though;PS C:\Windows\system32> New-FsrmQuota -CimSession...

View Article


Get-ADForest -Identity $domain

Hi all,Get-ADForest -Identity $domainWhen I am running this command, its saying that "could not find a forest identified  by"..please help me...my mail id smooth.munna@gmail.comregards,BhalotiaPK Bhalotia

View Article

Excel Charts in Powershell

I've been using the following article "Integrating Microsoft Excel with Powershell Part 2" to creat excel charts using Powershell.  I've tweaked it a bit to use pie charts instead of bar graphs and...

View Article

login to a list of computers simultaneously?

I do not know where to start on this but i need to know how to script logging into many computers simultaneously so as a logon script will kick off.It would be better if we had a time out/logoff...

View Article


-append option to Tee-Object new in v3

I am glad they added a -append parameter to Tee-Object, but I just found an irregularity to using it. If an existing file is in ASCII format (not Unicode) and Tee-Object appends to it, then the file...

View Article

New-Object -COM Excel.Application | certain fields are not showing,...

Hello All,Im having some trouble when using New-Object -COM Excel.Application on foreign machines primarily. It seems like my first four categories that are listed at the top of the spreadsheet have...

View Article

You can foreach a null?!?!?!

> foreach( $d in $null ) { "This will never be printed!" }This will never be printed!Huh?  Why would I ever want this to be acceptable behavior?

View Article


Get Out of a Function

Hi,I have a simple PowerShell script which contains just two functions, I would like to run through each of these functions, but in each one there is a condition where the function should terminate. so...

View Article


Rename Domain Computer Account GPO

I would like to create a script that will run at either startup or shutdown(whichever I can get working) in a GPO that will rename a domain computer based off of what is put into the description field...

View Article

Parsing non deliminated text file

I have a text file that contains information that needs to be imported into SQL table. However, the file isn't delimited in anyway. It contains a header row and the data inline below that. Here is an...

View Article

Windows batch and PowerShell passing variables issue.

If I use variable instead of number as build version value, it is not working. Any suggestion? Batch Script: ------------ set BuildVersion = 2.1 cd C:\Scripts powershell.exe -file Deploy-Axsis.ps1...

View Article

Replace wsh 5.8 with 5.7 on windows 7 ?

Hi,Does anyone know if something will break if I install wsh 5.7 on my windows 5.8 machine? (Assuming I can get around the WFP).I need SendKeys to function, and I do not need the OS protecting me from...

View Article


Using module dll in c# 'natively'

Hi,I'm trying to figure out if what i'm thinking of doing is normal or crazy.I'm working with a module (from netapp) and I want to build a tool which invokes the cmdlets without having c# invoke...

View Article

Error using Invoke-SqlCmd

Receiving error using this script: The TSQL script runs fine but errors in powershell.Exception             : System.NullReferenceException: Object reference not set to an instance of an object....

View Article


copy-item with write-progress

Is there anyway to add a progress bar to my copy block?$SQLVERSION = Read-Host 'What Version of SQL do you want installed? Enterprise or Standard?:' $mediaENT = "SOURCE" $mediaSTD = "SOURCE" $LocalENT...

View Article

Something akin to %PATH% for Windows PowerShell

I want to execute/call/reference PowerShell scripts in the Windows PowerShell console WITHOUT having to reference the whole path. In the old command prompt, I can call programs and batch scripts that...

View Article


HTML/CSS formatting fails while sending mail from PowerShell

Hi All,I'm sending the content of an HTML file through an email to other people. Below is the code I'm using.$body = (get-content c:\Temp.html) | out-string Send-MailMessage -To abc@gmail.com -Subject...

View Article

Passing SharePoint List values to DataSet to build email in Powershell

Hi, I'm new to powershell and SharePoint... I'm creating script to generate an email body and send it to the assignee.  Currently we don't have VS2010 so the only way i can do this that i know is...

View Article

AutoPopulate the fields with userdetails based on the UniqueID (user picked...

Hi,I have a requirement in the SharePoint 2010 List  containing the fields - Unique ID (People picker), FirstName(SingleLineofText), LastName(SingleLineofText) and so on.Whenever the user fill in the...

View Article
Browsing all 2562 articles
Browse latest View live


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