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

Filter results by values from array

Hey Guys,I'm writing a script to list the properties of SharePoint groups.This piece of code works fine but returns all Sharepoint groups in $site, meaning hundreds of records.$site = Get-SPSite...

View Article


Copy files to remote machine

hi all, please help me with this... in WINDOWS POWERSHELL     I need to copy files to multiple computers from my computer with following specifications..     1)I need to provide username     2)I need...

View Article


Make one command out of if/else statements - Cannot convert the value of...

Hello, I'm trying to make one command out of multiple if/else statements. For example I'm looking up a cloud in VMM, when it does exists add "-cloud $cloud" to $command, when it does not exists  lookup...

View Article

how to retrieve the "Partner agents with full access" and "Partner agents...

how to retrieve the "Partner agents with full access" and "Partner agents with limited access" users in office365 using powershell?thanksvenkat

View Article

start 2 processes in script with if / else command

Hy Everybody,I am new to powershell scripting and i am facing the following problem,For a specific application, that uses security dongles, i want to create a script that looks at the hardware id's of...

View Article


How to create a new-pssession that runs a administrator

Hello all,I'm trying to open a remote pssession to a management server that runs as administrator.When I logon to the server with my account account and start the powershell prompt, then it immediatly...

View Article

PowerShell Script -- A Beginner Needs Some Help

Hi Everyone,I hope that someone can help me out.  I'm looking for a PowerShell script that will ping all the workstations in my domain and search the discovered pc's for any versions of MS Visio...

View Article

exporting server volume information to csv file

 i have a working powershell script which searches active directory for a list of servers, then connects to each server and collects volume statistics and displays the results on-screen.  i would like...

View Article


Powershell sort files by date issue

I have an SSIS package where one of the tasks that I'm running uses powershell to sort files by Modified Date descending and then deletes all the files but the file that had the most recent...

View Article


Curious question about -Split (powershell)

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

View Article

Read file and then replace word from csv file

I want to replace words in config files, an replace the valor with value that are in csv file for example:User      New Userabc        qwrwer       123456I want to search the word  "abc" and replace it...

View Article

Get-BitsTransfer -AllUsers Remotly?

I am attempting to see if I can retrieve all the bits jobs running on a remote machine.  I have tried this code and it works great if using the local machine but nothing is returned for a remote...

View Article

Powershell Logon script that can't be killed from Task Manager

Hi,I am having a power shell script that runs as a logon script.  The script is critical and I want to prevent users from killing/stopping the process from Task Manager.  I can't give admin/system...

View Article


Exchange Message Count

Hi There,I am using the cmdlet below to extract the number of messages received by a users in Exchange 2010. it works fine and give me the message count however I cannot find a way to output the...

View Article

Find IP Address by MAC Address

I have a list of MAC addresses for remote PCs. How to find IP addresses they currently have?

View Article


download webpage content credential

I am trying to download a webpage content after passing on the credentails. Then downloading the content to a text file and then parsing it to fetch the desried result. I am able to get the desired...

View Article

Powershell ISE show-command addon

the show-command addon has stopped working.. it only has the all modules and if say I type in get-process (no intellisense) and if I click on refresh I get the wonderful Windows Powershell ISE - Error...

View Article


Getting a Null Value, not sure why.

I have the following $FileNameCur2 is giving me a Null value..    I have a directory "E:\AD\Deleted\" where once a day, a CSV file arrives example: UsersDeleted-2013-6-8-6-3-47.csvThe below scripted,...

View Article

Get-ADUser -Filter { lastLogon -gt $date } compared to Get-ADUser -Filter '...

Is there any difference between these two expressions with regard to what they return?Get-ADUser -Filter { lastLogon -gt $date }Get-ADUser -Filter ' lastLogon -gt $date '

View Article

Variable Values Lost When Executed via group policy shutdown

We're running windows 2008 R2, powershell v2.I have a script that runs just fine when I execute it manually in powershell. If I call the same script from the group policy, shutdown powershell scripts...

View Article
Browsing all 21975 articles
Browse latest View live


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