Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

Module confusion–what’s really in PowerShell 3 and 4

If I run Get-Module –ListAvailableon my Windows 8.1 system (PowerShell 4.0) I find a total of 58 modules installed in $pshome\modules i.e. C:\windows\system32\WindowsPowerShell\v1.0\ModulesThese are...

View Article


Windows PowerShell Operators

Windows PowerShell is designed to be an interactive command-line shell, but it's also a programming language. As you advance in your PowerShell understanding and knowledge, it's inevitable you're going...

View Article


Handling Errors in PowerShell

As DBAs, we're always working on protecting ourselves from problems by disaster recovery procedures like backups, but in our haste to get a script done, we also are prone to forget the same concept...

View Article

PowerShell –EncodedCommand and Round-Trips

PowerShell.exe accepts the –EncodedCommand parameter, which is a way to ‘wrap’ DOS-unfriendly command strings in such a way as to be safely passed into PSH for execution.  It’s a great feature....

View Article

Breaking Down PowerShell's Scope

One constant about PowerShell is that someone is always learning it. So I shouldn't be too surprised to get e-mails or tweets about beginner topics. It helps remind me that Prof. PowerShell needs to...

View Article


Windows PowerShell Operators

As you advance in your PowerShell understanding and knowledge, it's inevitable you're going to run into a number of core computer programming concepts. Operators are one of these core programming...

View Article

Windows Management Framework 5.0 Preview Introduces PowerShell 5.0

As if you needed more to this month with Patch Tuesday imminent, Windows XP and Office 2003 expiring, and Windows 8.1 Update 1 and Windows Server 2012 R2 Update on the way, Microsoft has made available...

View Article

WinRT and PowerShell Part 1

This is a post about using Windows Runtime (WinRT) components “projections” from PowerShell.Read More

View Article


List compile errors using PowerShell

 I always make sure that any compilations are logged. You do this by opening Tools, Options, Development, Compiler and check the "AOT log"-checkbox.Read More

View Article


Locate machines where a specific account is present

I need to find all machines where there is a local account named, say, 'John' and include its group memberships (specifically if the account is a member of Administrators and/or another group we...

View Article

Outlook 2013 Calendar appointment with invitation.

Hi all,I have a ps script that i am attempting to use to automatically set appointments through outlook 2013 that is an exchange account. Everything works except i cant seem to figure out how to send...

View Article

Building Excel Spreadsheet - From Inside Powershell Script

Greetings,Let me preface this post by stating I am a noob to powershell.  I am still in the very beginning phases of learning.  Thus far I have been able to pull down scripts, piece them together, and...

View Article

Can you explain this hashtable?

Hi,I understand the basic principle of powershell hashtables but there are elements of this one that I was hoping you can explain;@{name="MemberOf";expression={$_.memberof -join "`n"}}I don’t...

View Article


Switch parameter, Change/Set words

In my script, I extract a word in 3rd position, from a path.I then need to insert this word in a text, such asAdd-Content -Path $sFullPath -Value "NFSettingFile=C:\NG_auto_project\config\$word.ini"BUT...

View Article

add-type fails to load an assembly, but why?

I am trying to call method Path.GetFileNameWithoutExtension ( ie - [Path]::GetFileNameWithoutExtension( ... ) ).However, Powershell reports that the assembly containing the type is not loaded: 'Unable...

View Article


compare variable to object in array

Helloi am trying to get my script working but i am having some problem.I have a script that allows me to enter a string in a popup window. What i am trying to do is to get that string that has been...

View Article

best way to Copy file on a remote computer

This should be simple, but i'm new to PS.  What is the best way to copy files on a remote computer?  I will be running the script from ComputerA, and it will copy a File from C:\FolderA to C:\FolderB,...

View Article


New-Item change Get-Date format

I have problem with Get-Date and New-Item:example nr 1:-------------------$today = Get-Dateecho $today----------------------> show date format: 7 kwietnia 2014 10:45:11example nr...

View Article

Modifying properties of Recycle Bin with Powershell

Hi Everyone,I am trying to create a script to modify the properties of the Recycle Bin. For instance on some drives I want to change it so it doesn't go to recycle bin while on other drives I want to...

View Article

Disable services across several servers - found post by Martin, need help :)

Hey EveryoneI'm one of the newbies here and I am trying to disable several services on several servers remotely.I found a post by Martin but I wanted to post here so that I can use 1 forum.Here was the...

View Article
Browsing all 10624 articles
Browse latest View live