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

Firefox and/or Chrome settings changed with Powershell (or XML)

Hi there, My aim is it to install these two programs silently (already done). But not also do I want to install them silently, I also want to give them a specific configuration. I know how to change...

View Article


Import-PSSession and temp files in a concurrent environment

Hi everyone, I am doing Remote PowerShell in a programmatic way, such as explained here: http://blogs.technet.com/b/exchange/archive/2009/11/02/3408653.aspx ; last section "Remote Request using a local...

View Article


Hide Item From SharePoint in PowerShell

Hi, i try to hide a page from my navigation in PowerShell, can you help me !  The method ExcludeFromNavigation is not good, it clears the item from navigation, but i just want to hide this item....

View Article

Per user to set AD information if possible?

Hi, I use this powershell script to add AD post information,  but how can I set different post informaion per user account? Pls help! Get-AdUser -Filter * -searchbase...

View Article

Upload Files to an FTP site

Hi, I need to upload some files to an FTP site.  Done some looking and have only found this the code below.  It looks like it might work but I need to create a folder as well and there doesn't seem to...

View Article


Powershell v3 Invoke-WebRequest HTTPS error

Using Powershell v3's Invoke-WebRequest and Invoke-RestMethod I have succesfully used the POST method to post a json file to a https website. The command I'm using is...

View Article

PowerShell Test-Path Command

Hi, I am having problems with Test-Path Cmdlet I have created two variables Username and Password and then I am creating a PSCredential Object $credentials = New-Object -typename...

View Article

problem getting loginhours for users

when i do it one at a time it works $vUser=[ADSI]"LDAP://CN=mylastname\, myfirtname,OU=S99X01,OU=Field Offices,DC=mydomain,DC=int" $vHours=$vUser.loginhours $vUser.path $vHours works just fine but...

View Article


Office365 User report based on Get-MsolUser and AccountSkuId

I asked this question in the Office365-forum but was asked to post it here instead so I hope someone can help me. We have a mixed O365-enviroment with federated accounts that have the E3-licens and...

View Article


Adding values to array - Export Array as CSV

Hi, I'm New to powershell, trying to create a small script to get macaddress from IP address. $ipsheet = get-content c:\work\ipsheet.txt $ipvalue="" $macvalue="" foreach ($ip in $ipsheet) {if...

View Article

Display Japanese characters in English Powershell console

Hi, I am new to Powershell.I have problem in reading the output in Japanese ,below is the script I am using $query = "Select * From Msvm_ComputerSystem " $VOs = (gwmi -query $query -namespace...

View Article

Can somebody help me export this script to TXT or CSV?

I've found a script that I'm using to discover all members and nested members of a distribution group.  The script is great, but I can't seem to find out how to export the tree view results to .txt or...

View Article

System.Net.WebRequest not presenting my certificate

Below is a snippet of code I have written to make a SOAP request to an internal Web Service we have.  If I run this with Fiddler running Fiddler alerts that the site is requesting a cert.  If I provide...

View Article


Use AD cmdlets against another domain in a different forest

My user account and machine where migrated to a new domain in a different forest last night. My account in the old domani is still active, as there is still stuff I need to do until we get rid of it. I...

View Article

Sample code required for Invoke-RestMethod using HTTPS and Basic Authorisation

I'm trying to use powershell V3 to play with a HTTPS restful API but am having difficult connecting to it! I used FireFox's RESTClient to verify I'm using correct API calls and basic authorisation...

View Article


How can I create a new mailbox with "EmailAddressPolicyEnabled" attribute of...

This is a tow step process for us: 1- The AD account is first created - but there is no SMTP address created at this time 2- I then need to enable-mailbox for that new user - but I don't want the...

View Article

Help importing CSV to SQL

Hi, i  want to get ad replication into a SQL DB with this script but it is not working, what i am missing? Thanks  Add-PSSNapin SqlServerCmdletSnapin100 $sqlsvr = 'myserver' $database = 'mydb' $table...

View Article


Scripting

Hi Folks, I have a script that I used on Windows Server 2003 and it will work on Windows Server 2008r2.  I use it to run NTBackup.  However, it is not clear to me that WSH will continue to be...

View Article

A positional parameter cannot be found that accepts argument ' '.

I'm getting this error that I have been trying to resolve.  Need some help please. PS H:\> C:\Errors-chk_exch4.ps1 A positional parameter cannot be found that accepts argument ' '. At...

View Article

Powershell: Scan computer names in a certain AD OU with credentials

I just started messing with powershell a couple days ago so I don't know much about it, but... I'm looking for a powershell script that will scan all the computers in a certain AD OU with credentials...

View Article
Browsing all 2562 articles
Browse latest View live