Running job on remote computer as scheduled job
There seems to be times and reasons why running a powershell command or script on a remote computer as a scheduled job is a neccesity. I have been trying to come up with a way to do this on all my...
View ArticleImport users from CSV file
Hello,I'm trying to import users from a CSV file into AD.This is what I've got so far:Import-Csv .\test.csv | foreach-object { New-ADUser -Title $_.UID -Surname $_.Surname -GivenName $_.GivenName...
View ArticleThe server threw an exception. (Exception from HRESULT: 0x80010105...
When I use PowerShell to call Office Word Com Object the exception occured.$:word = New-Object -ComObject 'Word.Application'$word.Visible = $true$doc = $word.Documents.Open($File)$selection =...
View ArticleNot reading variable properly when script run from the shell.
Hello,I think this is probably something I'm doing incorrectly.I'm doing a simple script to send an email with the Net.Mail.MailMessage class. This is because with that it's easy for me to construct...
View Articleis Powershell like Perl?
Sorry for the simple question. Seems I can't use my Perl oneliners at work anymore... but I can use Powershell... So before i try to learn it.... So.. can i use powershell to write one liners that...
View Articlecan't delete a file
This code works when I run it against my local computer. $packageID = Read-Host remove-item c:\temp\tmp\remove\$packageID.* remove-item c:\temp\tmp\remove2\$packageID.* The file $packageID.* was...
View Articlemodifying mapirecipient with powershell
I would like to set the mapirecipient field from $True to $False for a contacts in Active Directory ( These are contacts and are not mail enabled) by loading the Exchange shell I can get the...
View ArticleNeed script to run for each site then create site report then email to site...
All I'm currently having issues with combining multiple scripts into one. What I need is to run my script against each site ou then create the site specific csv file by site name then email it to the...
View ArticleLoad the Script Configuration File in Other PowerShell Tools
If you want to work with vSphere PowerCLI from another PowerShell-based tool, such as PowerShell Plus or PowerGUI, you must load the default script configuration file manually.Read More
View ArticleIntroducing the Pipeline and ForEach
Last month, in "Where-Object and the Pipeline," I showed you PowerShell's pipeline and the pipeline's Secret Name ($_). In previous columns, you've seen how the pipeline can let you combine two Active...
View ArticlePowershell: Dell Client System Update for the SCCM & MDT Build
The DCSU is a great utility that Dell has made available to update the drivers and driver applications on Dell systems. The industry I work in requires specific drivers for specific applications, which...
View ArticlePowershell: Add/Remove Program entries
Sometimes it is necessary to add an add/remove programs entry. There are instances where an application is independent and requires not installation and you want to make sure it is copied to the...
View ArticleCreate a log file?
I have a Powershell script I've written that "builds" a Windows 7 PC with all the accounts, apps, users, etc that we need. Is there a simple way to create a log that lets you know all went okay? For...
View ArticleAdd-Type -Path c:\scripts\validateMatches.dll failing.
I can get Add-Type -Path c:\scripts\validateMatches.vb to work with the script below but trying to reference the compiled version fails. This script just adds a [ValidateMatches] type and is identical...
View ArticleRemote powershell execution
I have a mixture of Windows 7 and XP machines that I need to setup to enable them as clients to remote execute a SQL SSIS package. The package and RDBMS is located on a Windows 2008 server. On the...
View ArticlePull MsolAccountSku info from office365
Hi,I'm trying to pull information from office365 about licence which are available. $a = Get-MsolAccountSku;$licene = @();$count=1;foreach ( $aa in $a ){ $t = ($aa.ActiveUnits -...
View ArticleRun the batch file in remote system
I have batch file which is residing in the remote system (C:\RunJob.bat) Batch file contains code to open notepad.exeRemote system name : RemoteSysLocal system name : MohanSysHow do i run the...
View ArticleSearching files in Windows with Powershell
By supplesoftware Searching files in Windows with Powershell. 06Aug09. The new (well, not that new now) Windows search is way annoying, so I thought may be I could use Powershell for searching. This is...
View ArticleGetting latest file name from file and test
Normal 0 false false false EN-IE X-NONE X-NONEHello, Wondering if the below scenario is possible I have a folder that contains flat files and are named in sequence 111,112,113,114 etc Each day I...
View ArticleCalling Web Services in Password Reset Server with PowerShell
Here is an example of using PowerShell script calls Authenticate, UserEnrolled and ImportAnswers. Note that the you will need PowerShell 2.0 (and not the default 1.0) installed to run the script....
View Article