Quantcast
Channel: PowerShell.org » All Posts
Browsing all 13067 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

I'm doing it wrong – calculation not working

I’m trying to script the detection of freespace of dedicated virtual desktops in our VMware View environment. Based on the freespace percentage returned, I’m hoping to resize the disk in vSphere via...

View Article


Reply To: I'm doing it wrong – calculation not working

Well, you’re only multiplying your Free Space by 1.05, instead of your Total Space. Other than that, your code looks fine.

View Article


Reply To: I'm doing it wrong – calculation not working

You know that feeling when you haven’t had enough coffee and just posted a stupid question on the Internet? Sigh. Thanks, Dave!

View Article

Reply To: Initial Thoughts on DSC E-Book

Don - The book states that “On Windows 8.1 and Windows Server 2008 R2, make certain that KB2883200 is installed or DSC will not work.” If I look up that KB (http://support.microsoft.com/kb/2883200) it...

View Article

Reply To: Initial Thoughts on DSC E-Book

Typo.

View Article


Newb question about Get-scheduledtask

I’m pretty new to PowerShell. I have about 200 hyper-v servers running 2008, 2008R2 and 2012 server. I need a list of scheduled tasks for each server, but I’m only interested in the non-microsoft...

View Article

Reply To: Newb question about Get-scheduledtask

Get-ScheduledTask is a feature of specific versions of Windows, not a version of PowerShell. Ergo, it doesn’t exist on some of your computers. “WinRM quickconfig” isn’t the best way to enable...

View Article

Reply To: Newb question about Get-scheduledtask

Oh, correction – I see PowerShellPack.msi. Sorry, I saw that and thought of PowerGUI for some reason, since it uses PowerPacks. Anyway, yes, PowerShellPack.msi is the installer that brings some of the...

View Article


How to set the profile for PS for web access

Hi, Has anyone figured out how to create a PS profile for all users logging on to Powershell for Web Access? Thanks in advance.

View Article


Image may be NSFW.
Clik here to view.

Reply To: I'm doing it wrong – calculation not working

No problem! BTW, I don’t know if you’re aware of this, but you don’t need to hard-code the value 1073741824. PowerShell gives you a more readable version of that: 1GB $totalSpaceGB =...

View Article

Reply To: Manage PSSessionConfigurations

Just for clarification, are talking about signing a .pssc file? As far as I know, that cannot be done. This is not really a script but a configuration file that uses a hash table to specify the level...

View Article

Reply To: Get-AdComputer cmdlet on Windows 2003 SP2 Server

Thanks Dave, I installed the Remote Server Admin Tools Pack on my Windows 7 Machine and had it working smooth

View Article

Reply To: Need Help with Advanced Functions

Yeah I am still trying to grasp the concepts of PowerShell toolmaking. I know my code looks a bit scatter brained. I guess I just need to study up on functions more. One question, I put cmdletbinding,...

View Article


Reply To: Clone Required

LOL

View Article

Reply To: Need Help with Advanced Functions

Both scripts and functions (and any other script block, for that matter) can have a param statement. Typically, you’ll put functions that you intend people to call directly into a script module (psm1...

View Article


Special characters being passed as parameter

# Preface Windows is an after thought not a priority at my company I am writing a script that will take an input parameter into the function. The strings are a POSIX based timezone string that...

View Article

For anyone having trouble with DSC Configuation Manager Win 2008 R2….

I have finally found out why DSCLocalConfiguration Manager for Powershell for Web Access was not available on my Windows 2008 R2 and thought I would share… You have to install .NET 4.5 BEFORE you...

View Article


Reply To: Special characters being passed as parameter

There’s nothing in those strings that would cause a problem for PowerShell, so long as they’re quoted. Some-Function -Parameter 'Argentina/San_Luis – WARST – (GMT/UTC -3) Daylight Savings Time'...

View Article

Reply To: Special characters being passed as parameter

Thank you David, However I won’t have control of the quotes they will be passed as a parameter to my script from an RBA and Orchestration like system (Not Microsoft product). So I guess my question...

View Article

Reply To: Special characters being passed as parameter

The quotation marks are not part of the strings themselves; they’re what indicates a string literal. Once you have a [string] variable, you can do whatever you want with it, and the contents don’t...

View Article
Browsing all 13067 articles
Browse latest View live