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

Assigning user rights to other mailboxes using PowerShell

Hi guys! I'm an Intern at a certain IT company, I've been given a task by our manager to assign user rights to certain mailboxes using PowerShell. Now the  thing is, I have to get on to office365 using...

View Article


HTTP staus codes for system.net.webclient

I have the following$url = 'www.bbc.co.uk'$WebClient = New-Object -TypeName System.Net.WebClient $webclient.credentials = New-Object System.Net.NetworkCredential -ArgumentList $username, $password...

View Article


Renaming Registry key

I am looking to change a registry key based on the output of an variable, in my case, its hostname. Basically i want to rename a registry key with the hostname of current computername. i would just...

View Article

where is my existing powershell script saved

I have an existing powershell script on my computer.Everytime I run the diskspace 'servername' it will show me the correct disk space on the drives.But now I would like to edit the script, but I cannot...

View Article

SendKeys vbscript method only targets active window

Hail to the gurus... I've an issue here.  We're running a script that pulls IP addresses from a file, opens a telnet session to each in turn, and then requests some data from the host before exiting...

View Article


Regex to find passwords in web.config

Hi,I'm working on a powershell script to create copies of web.config files and to hide all the passwords in the copies so they can be given to others. The problem I'm having is I can't figure out how...

View Article

Powershell scripts

Any one has some script that does the following job  on SQL servers:1. A powershell script that check free space on drives, if 10% free, send an email to adminstrator2.  A script that keep track the...

View Article

problem sending email

I tried using the following script to send an email alert. But it always complained with error. I tried putting [string] in front of $emailFrom, $emailTo, $subject and $body and it didn't make any...

View Article


can't find some new cmdlets in powershell 3

I downloaded and installed Powershell 3 on my Windows 7 desktop. However, I don't see some of the new cmdlets available in version 3, such as set-netfirewallprofile, get-netipinterface. Do I have to...

View Article


Replace Variable in all folders and subfolders with specific extension

I'm looking for a simple way to replace a variable in multiple .cfg files in all subfolders. I have a basic example that works but I would have to list all paths for all of the .cfg files in all...

View Article

How do I replace 'no value' with a string?

Hi Given this script:$RS=@{'001000'="Desktop All-In-Ones"'002348'="Hardware Processors"} Import-Csv -Path c:\temp\FileA.csv | Select-Object @{Name="v_categories_name_1" ;Expression={($RS[$_.'Category...

View Article

Download JPG from URL parsed form Web Page parsed from CSV

$csv = Import-Csv -Path "c:\temp\source.csv" foreach($entry in $csv) { $url = ("http:" + ((Invoke-WebRequest –Uri ‘https://www.website.com/webpage.php’ + $_.'vendor part number').Links |` Where-Object...

View Article

Using powershell to backup .net application web.config files with unknown...

Hi, I thought I was doing something reletively simple but it seems to be more complex than I thought. What I am trying to do is create backups of all my web.config files based on the information...

View Article


Exporting Excel data to Sharepoint

HiI have a weekly report of staff emailed to me in an XLS format. On Worksheet2 (Global Staff), I have a list of staff (ColumnA) and what their positions are (Junior, Senior, Manager).I need to upload...

View Article

PowerShell Web Access Authorization Failure

Hello,I have installed PS Web Access on a Server 2012 Eva Build 9200. I have taken the following steps:http://www.falconitservices.com/support/KB/Lists/Posts/Post.aspx?ID=98When I enter my credentials...

View Article


Help to change network settings on multiple servers

I have a need to make changes/ corrections to muliple servers network settings. I have the following script that will make the changes to a single server to what i need.So if i have a .csv file where...

View Article

Queries of username from win32_computerSystem on local or remote Server 2012...

Different queries to obtain currently logged-in user on local or remote PC with Windows 8 or Server 2012 OSs bring empty results.If you run in PowerShell on either OSs:Get-WmiObject...

View Article


AD Users / Import CSV File Update Attributes Script

Hello I am attempting to modify some standard AD account fields with the script below. Sorry... I am a Powershell newbie. Please help me fill in the missing pieces to get it working correctly. Do I...

View Article

How to add a Remark in code?

Hello,Wrote a simple PowerShell module using a C# library ( http://vimeo.com/10007373 ). This is PowerShell 3.0 with .Net Framework 4.0 on Windows Server 2008 R2. When I run help, I get . . .PS...

View Article

read\write content from all files in a folder

I can write contents from a file and write to a file: (read first 10 lines from SourceFile to variable $test, write to a result.txt file.PS C:\Myfolder> $test = (get-content sourceFile1.txt -...

View Article
Browsing all 2562 articles
Browse latest View live


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