Quantcast
Browsing all 21975 articles
Browse latest View live

Invoke installation .bat

Hi all I have a silent install .bat for Construct 2. I need to invoke it on a few machines as a bandage till we put it in SCCM. However I'm sure how to invoke bat files.  I'll paste what I have. Do I...

View Article


parameter sets - getting the ambigous error but don't know why

Hello,Example parameter declaration: param ( [Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)] [string[]] $criteria, [Parameter(Mandatory=$true, ParameterSetName="ByIP")] [switch] $IP =...

View Article


AcL extraction

I'am trying to extract ACL on some shares, these shares are protected with normal Permissions and a Central acess PolicyIs ther a way to get the real Permissions like the ones i get from the "effective...

View Article

Get-ADOrganizationalUnit

> Get-ADOrganizationalUnit -filter * -Properti es ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion - eq $false} | ftWhen I run the above command in powershell, I get this...

View Article

PowerShell - Return first negative foreach result, then continue

Hello,I created a foreach object as the following, described the easy way.FOREACH SERVER, TRY PORT, RETURN IF THE PORT IS OPEN OR CLOSEDLets say it checks 100 server, and the 22nd server says CLOSED :...

View Article


syntax help -- checking for value

  I'm reading in my csv file and before loading data to SQL want to check a input data for a value and if contains load a Null to SQL field. It appears to skip check and just fail load process saying...

View Article

How can I import contacts into a mailbox and overwrite the previous ones?

Hey guys, so I am new to powershell. I understand some of the basics and am still trying to teach myself as much as I can.So I have been asked to automatically push our company's contacts to everyone's...

View Article

redirection of output?

I am running a command executible by calling: $command = some.exe < a bunch of parameters>invoke-expression $command If i pipe the output to files like this:invoke-expression $command...

View Article


problem with the powershell pipline parameter process

Hi, I'm confused with the pipeline processing of object-property-parameter association.Here my Cmdlet example Function test-psboundbug{ [CmdletBinding(DefaultParameterSetName='Parameter')] param(...

View Article


where are docs for VirtualMachine object

Where is the documentation for the Microsoft.HyperV.PowerShell.VirtualMachine object? (The "Get-VM" cmdlet returns these objects.) Maybe I'm blind but I can't find documentation for the properties for...

View Article

Need to Query Local Admin Group

I wrote (copied) some PowerShell code that will add a Domain User to the Local Admin Group using ADSI.   $GuestPC = "WinNT://DOMAIN/UserName,user" $AdminGroup =...

View Article

checking if a user exist +script does not work

Hello everyoneI am trying to create a script that checks whether a user exists or not in AD. I have seen other posts with similar problems but I can not make mine work. :(Here is my script which to be...

View Article

Get-ChildItem on version 2.0 vs 3.0

Not sure if this has been discussed or is known, but I found an interesting issue when running Get-ChildItem on version 2.0 vs 3.0So I have the simple command of$files = Get-ChildItem -Path $Source...

View Article


Image may be NSFW.
Clik here to view.

is update not approved for a specific group via powershell.

My apologies in advance for asking a similar question to the one I asked two months ago, is update approved for specific group via powershell? I thought I had this covered, but as I've found time to...

View Article

how combine multiple properties from one array to another

im trying to script for rodc , which will schedule connect through vpn and see which password was changed last time, if password changed, it will replicate them , so ,,lets say i have,$adusers = $users...

View Article


What do I need to install on the server to get Powershell for Sharepoint to run?

We have a dedicated job scheduler box and I want to schedule a powershell job to run. This script uses SharePoint snap-ins. SharePoint is not installed on the Windows 2008 r2 job scheduler...

View Article

Is it possible to create a cmdlet using PS script ?

Mostly cmtlets are compiled code which are written in c#. Is it possible to create powershell cmdlets using powershell script ? -Pranav

View Article


Where-Object filtering using an array

Greetings! Trying to use Where-Object to filter out the returned data from Get-ChildItem. I essentially want to include everything that matches "Microsoft Lync Server". This works fine for matching...

View Article

exploring $profile makes me ask a question about Format-List

Look at this sequence of commands below and the results using powershell.exe v3. Why does adding the -force parameter to that last command make it display the NoteProperties ? And, why is the value of...

View Article

build array within scriptblock and use outside the block

Hi, I am using scriptblock to run several commands in parallel. The code working fine. BUT I am trying to build an array of object within the scriptblock. My aim is to have all execution results in one...

View Article
Browsing all 21975 articles
Browse latest View live