passing the path as a variable in powershell script
i want to pass the path as a variable to my scriptthe error is cannot find path path does not existmy code$a=read-host$b=read-hostcopy-item $a $b
View ArticleWorking with Modules
Dear All,I want to design a module where I want to use it in this way:import-module my_moduleIn the same console, later on, I use my_module and start using it. I have built a...
View ArticleUse multiple columns from a CSV in the one command.
Hello all,I would like ot know if i can take 2 columns from 1 CSV file to create a parameter response in a powershell command.For example, I have a CSV file containing Ad user data which is ot be used...
View ArticlePrint to a network printer
HelloIwould like toprint to aof arbitrarynetworkprinter notthe defaultprinter.I havethe following scriptDirc:\myFolder\*.Pdf|Foreach-Object{Start-Process-FilePath$_.FullName-VerbPrint}Iwould like...
View ArticleAll Users Report
Dear,I am looking for a script that could generate ALL users report which should include:DN, CN, FirstName, LastName, DisplayName, Email , TelephoneNumber, Mobile, Description, Office ,pwdLastSet,...
View ArticleLocation based printing script
Normal 0 false false false false EN-US X-NONE X-NONE Im a new VMware View Admin and Im having an issue with location based printing. It is not consistently working and instead of spinning my wheels on...
View ArticleSetting Web Site RequestFiltering/RequestLimits/MaximumAllowedContentLength
I am trying to set the Maximum Allowed Content Length for a web site under IIS 7.5 using Powershell 2 or 3. The only examples I have seen use appcmd ... This is easy to do with the IIS Manager UI by...
View ArticleNeed to automate a telnet session
I am very new to powershell(only started yesterday) I downloaded a piece of code which connected via telnet to an IP, which I modified to fit my needs. It connects fine, but when it asks for password,...
View ArticleI need my script to wait on a registry value to populate
I having an issue with a powershell script that is running a little to early. The script is suppose to read a registry value or attribute then map a printer. The script runs on startup and based on the...
View ArticleDynamically split objects into smaller groups
Scenario is as follows:Pass in large number of systems (say 1000), break into same size groups (say 100), execute a background process for each group to conduct a WMI query, so I end up in this example...
View ArticleNeed listing of who is not a member of one of several groups
We have a number of groups that are tied to Group Policy Preferences that map drives, one each of these groups and policies per department. What I need to know is who is not a member of any of those...
View ArticleconvertFrom-Json is not recognized as the name of a cmdlet
I'm trying to use the convertfrom-json cmdlet and when I attempt to use it on windows 7 in powershell, i get that it is not recognized. I have read:The Microsoft.PowerShell.Utility module is installed...
View ArticleUserLastLogon - In a txt file
Hi All,I am trying to get Users Last Logon using a test file in which I have users SAM accountsBelow is my script-----------------------------------------import-csv users.csv | Get-QADUser -id...
View ArticleMicrosoft CRM Snapin Errors
On a server(2008R2) with CRM installed I do a add-pssnapin microsoft.crm.powershellEverything is great, but then on every get I try to doGet-CrmOrganization : The remote server returned an error: (500)...
View ArticleVariables for DOS parameters with function
Hi,I would like to create a function with dos command(xcopy) and to create for this DOS command paramaters in variables (original dos command with paramters: "xcopy C:\Temp\Force2.csv C:\ssm /S /E...
View ArticleCan I Improve my code by using AsJob (Help)?
Hi All,I am working on a script which checks a server for ping and then checks all SQL Server Services status and stores this in a table. It also caters for SQL Instances. However I have to check...
View ArticleUsing System.Windows.Window from PowerShell
HiI am playing with the recently blogged Lock-Screen function (Temporarily Locking the Screen). It is working fine in the ISE but I can't use it from the PowerShell console shell.I'm getting an error...
View ArticleGet Hex Dumps of Files in PowerShell
A number of years ago, I had an old MS-DOS utility (the exact name of which I can no longer remember) that let me perform a hexadecimal dump of a file. That is, the utility output the hex value of each...
View ArticleGeek School: Learn How to Automate Windows with PowerShell
In this edition of Geek School, we will be helping you understand the powerful PowerShell scripting language that is built right into Windows, and is extremely useful to know in an IT environment.Read...
View ArticleHow to get the new PowerShell cmdlets for CM2012 SP1 CU1 without installing CU1
Per KB article 2817245, Microsoft suggests only installing CU1 for ConfigMgr 2012 if your installation is experiencing any of the issues fixed by CU1. However, there are quite a few new PowerShell...
View Article