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

Powershell parsing question

Hi all,I'm trying to parse the below data and write it into a CSV file. I need to gather all the bolded data and the script that I have allows me to get the first 16 items (which is  exactly what i...

View Article


PowerShell Web Access - Creating "Self-Serve" Behaviour

Hi all,I am exploring PowerShell Web Access and I'm looking to set it up to offer self-serve capabilities to Dev/QA.  Basically I want to Dev/QA to only be able to execute scripts (no running cmdlets,...

View Article


New-ImapSubscription

I'm trying to run a PS script to setup users connected accounts on Exchange , i'm connected to PS with ContosoAdmin: New-ImapSubscription -Name "My IMAP" -Mailbox mailbox@domain.com...

View Article

Remotely executing an invoke-sqlcmd fails

When remotely executing an invoke-sqlcmd fails.  A simple query such as:Invoke-Command -ComputerName ComputerName -ScriptBlock{ $qry = "SELECT SERVERPROPERTY('ServerName') AS ServerName,...

View Article

Use PS to install SCCM2012 Client on a remote machine

Does anyone successfully use PS to install SCCM2012 Client on remote windows 7 machine? it seems not working by using ([WMICLASS]"\\$ip\ROOT\CIMV2:win32_process").Create("cmd.exe /C MD...

View Article


Find only one different extension, whole path, last write time, only files...

Hello! I need some help with my PowerShell script. This is what I got so far. Get-ChildItem p:\ -Include *.* -Recurse | Where { ! $_.PSIsContainer } | Select-Object Extension,LastWriteTime |...

View Article

Etract data to Excel

Good day im a newbie i have a text file (LOG.TXT )that contain the following info below. S e r i a l N u m b e r      M X L 1 0 3 0 8 3 4          TW-BW-JU-IT-12S e r i a l N u m b e r      M X L 1 0 3...

View Article

Image may be NSFW.
Clik here to view.

Script to create a folder that can print a certain amount of files - works...

I've got this script [int]$copies = Read-Host "Number of copies" for ($i=0;$i -lt $copies;$i++) { Get-ChildItem "C:\Users\USER NAME\Desktop\PrintMe" | foreach {Start-Process -FilePath $_.FullName -Verb...

View Article


Assistance with my script to find all opened windows (applications running)...

Hello,I have the following script whereby I want to list all the running (opened) applications on a remote computer.  It's a shared computer between two people who use the same generic ID.  Before one...

View Article


Image may be NSFW.
Clik here to view.

Details of a thread in Powershell

How can I get the CPU consumption of all threads running in a process thru powershell, in a format similar to thisI can't find any processor information when I run gwmi win32_thread|select -First 1....

View Article

[DOC BUG] in Start-Job cmdlet parameter -FilePath

In http://technet.microsoft.com/en-us/library/hh849698.aspx, it can be read:<#-FilePath<String>... Enter the path and file name of the script or pipe a script path toStart-Job...... Accept...

View Article

Usage of Set-DNSServerSetting

Hello all togehter,I have severall Windows 2012 DCs with DNS installed. Until now, I use a batch file to configure the DNS for my demands. Since 2012, I can configure DNS with PowerShell and I want to...

View Article

Combine Multiple Output into Single Output using powershell command

Is there a way merge all the below output into single output using powershell script. The output needs to be in html format sorting out the user in mailbox size on descending order $User =...

View Article


Powershell unzip with shell.application not working when launched from...

I have a deployment agent on a machine implemented as a windows service. Service is 32-bit and runs on windows server 2008R2 x64 SP1 with powershell V2. Powershell script requires elevation and to run...

View Article

Cannot connect to Office 365 using Powershell on Windows 7 SP1

Hi, I was trying to connect to Office 365 using windows azure active directory module for Windows Powershell. $Cred = Get-Credential Connect-MsolService -Credential $cred It failed on my windows 7...

View Article


Remove exchange forwarding for some users and loop help

Hi We need to remove the email forwarding settings for some of our users. Some users have their email forwarded to "My email [BLAH]" where "[BLAH]" always appears in the name of the contact that the...

View Article

Change file asociations via Powershell

hi guys, someone know how can we change a file asociation using powershell?I want to make the same that we can achieve using Explorer and the option "Choose Default Program"

View Article


[BUG] in Start-Job cmdlet when piping job's name to the cmdlet: the resulting...

Consider this script:$job=[pscustomobject]@{Name='Qwerty'} | sajb -ScriptBlock {ps}The job is created, successfully, with the name specified above.It can be seen commanding:gjbNonetheless, trying to...

View Article

Set default printer $CheckBox with powershell

Hey I was hoping someone could help me out with this. I am building a GUI to add a printer and giving it a check box to set it to the default.  Everything is working correctly except that when it set...

View Article

regex

WelcomeI need from html file or $http1_request.responseText extract string beetweem two others stringsGot this html code http://pastebin.com/B4zW03zp $wynik = $http1_request.responseText $wynik |...

View Article
Browsing all 21975 articles
Browse latest View live


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