Remotely Querying a key on all user's registry on multiple machines
basically what I want to do is run a query on all machines within an IP range to find a registry key from each user on each machine, all the machines are on a domain which I have domain admin onit...
View ArticlePowershell and Plink
Back again Being that I am new to powershell; I am trying my best to learn it and to get my first function to work completely.I have this fuction; it does complete but somewhere I must have went wrong...
View ArticleException calling "Add" with "1" argument(s): "This row already belongs to...
Good afternoon Powershell.com !I am trying to automate some paper based processes using Powershell. We already had in place a Powershell solution where the output was an Excel Spreadsheet, but for...
View ArticleInvoke Command not reading a parameter
Hi thereI'm just testing a section of my script whereby i want to eliminate hard coding a version folder and pass something like thisLogin credentials are passed in the script from another XML so that...
View ArticleTrying to invoke script from two levels up
I need to execute a script that is in a path structure that is two folders up (back) from my current location. I can not move either script. I have tried invoke-expression -command ".\<script...
View ArticleGet a list a users from a group, then get all of those users group recursive...
I am stumped on this.. I am close I just cannot figure out how to get the recursive group membership for the list of usersHere is what I am doing, but I have tried this several ways$group=...
View ArticleAdd an additional window with question
Hello to all, i am a beginner in powershell, maybe you can help me.This script opens a window where you can enter a licensekey, and this key will be written in a certain Reghive....
View ArticleInstallation of Software's using SCCM from Service-Now
Trying to atomize the Installation of Software's using SCCM from Service-Now. written Powershell Scripts which run in the Firewall and connects to the SCCM Server. But we are getting the following...
View ArticleProcess in a disconnected session ends after 2 hours.
Hey guys.Im having some issues with users that needs to run a process for longer then 2 hours i a disconnected session.This is the command that we use. invoke-Command -ComputerName Post-1...
View ArticleADgroupMember script
Hi Guys,I am learning powershell , This is basic script to display username, Displayname and title $group=Get-Content'D:\New folder\list.txt' Get-ADGroupMember -Identity$group|Where-Object {...
View Articleimport-csv with twist
Hi thereI have csv that looks like this:upn,emailvictort@test.corp,victor.test@test.com$importedusers = Import-CSV c:\scripts\users.csvforeach ($user in $importedusers)If I wanted to add some prefix...
View ArticleTrusted Sites in Internet Option
I am using the following, in a batch file, to add a trusted site to the internet options security tab trusted sites area:powershell -Command "& {set-location...
View Articlehash tables square brackets and convertto-json
Hi usually I find I can work things like this out, but this one has had me turning circles for days :(I am sure the answer is pretty easy and something I have missed , but I have tried all types of...
View ArticleUse PowerShell to List RDS Sessions
Q: How can I use PowerShell to check all my Remote Desktop Services sessions?A: If you want to use PowerShell instead of qwinsta.exe to list your Remote Desktop Services (RDS) sessions, you can do so...
View ArticlePrompt for a password with a mask using Powershell
Here’s some code that I absolutely know I’m going to need again in the future, what better place to put it than on my blog!If you need to prompt the user for a password when using Powershell then you...
View ArticleTest-Path from a list
This should be fairly easy and i did similar with test connection. I have a list of home drives, that were established in AD.90% have this set but the folders do not exist. I used $Test = get-content...
View ArticleCheck for snapin
This should be an easy one for someone with more experience than me in this area. I am creating a process that requires some snapins:Add-PSSnapin SqlServerProviderSnapin100Add-PSSnapin...
View ArticleCreating a string from a get- command
I'm running this to get the primary SMTP address, I'm looping through a CSV that has a list of all the SamAccountNames that I'm modifying.$Primary=get-mailbox -Identity $_.SamAccountName |...
View ArticleNeed Help Passing Parameters
I have a script that accepts parameters, dynamically create and execute SQL commands to backup and restore Databases using a backup agent. My desire is to use this script file in conjunction withe the...
View ArticlePoSH, and WSDL\XML
Hi, been trying to figure out an actual question from a client, while learning at the same time, but am currently stuck. The basic premise is that they have XML source from which they need to retrieve...
View Article