Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Create user on both AD and Office365

Hello, I have recently move my users to Office365. I haven't DirSync and I can't set up for the moment. Now, I create user both on AD and Office365/Exchange Online. I would like to use a script to do...

View Article


Image may be NSFW.
Clik here to view.

Functions from Module Scoping Question

Hello,I have the following case:I`m using module that contains several functions, some of them are executing commends in remote sessions. These functions are used from Powershell Script. The issue is...

View Article


Calling a PS script from VBA with parameter

hi i try to call  ps script  that take input and return the value in exel sheet using VBAbut i have problem when i try to call and  pass the parameter  to the script .powershell return this  error...

View Article

The ps1 script that access AD from my computer is very slow

hi i have given a task to create excelsheet that take user id and retrevie user info from Active directory into the the same exel sheetalso the excel sheet must be run from my computer and my computer...

View Article

Psexec med Windows Update VBScript

Hi it's Possible to run Psexec with PowerShell ?psexec \\COMPUTERNAME -u domain\username -p password %SYSTEMROOT%\system32\cscript C:\WUA_SearchDownloadInstall.vbsI have done a powershell script there...

View Article


Error Handling in PowerShell Need Help..

Hi, I am new to powershell, with the help of some forums i was able to make a script which helps to expand the C Drive of the VM's in a vcenter. But i am not sure how to handle the error's in it. For...

View Article

Cmdlet for SPO Library Settings

I am new to using PowerShell and have been searching but could not locate anything like this.Looking for cmdlet for help with SPO Library Settings. Two issues to address: I need to locate which...

View Article

Piplelines with and without Foreach cmdlet

A question about the pipleline and foreachSay I have the below 2 patterns of PowerShell pipeline syntax:cmdlet1 | cmdlet2 cmdlet1 | foreach {cmdlet2} How do I intuitively decide which one among the...

View Article


Need to format a vpn log text file into a format that can be written directly...

I am trying to do two thing inside of powershell1. Take a vpnlog text file  "C:\temp\ps3\vpnlogs\testlog.txt" formatted as such and be able to directly add the columns to a sql table"Number" "Date"...

View Article


Using variables inside a scriptblock using | where-object

HiI have this issue with passing variables to my scriptblock.#Get files script block $getfiles = { Get-ChildItem -Recurse -path $args[0] | where { !$_.PSIsContainer -and $_.Extension -eq $args[1] } |...

View Article

Install-WindowsFeature from share fails

Hello,I try to install the Windows Feature "NET-Framework-Core" on a clean Windows Server 2012 R2 computer. I use the following command for this:Install-WindowsFeature -Name NET-Framework-Features...

View Article

splatting & extra arguements

Hi,I am writing a series of wrapper functions for new-ADUser and Set-ADuser cmdlets.  I seem to have reached a dead end on how to approach this.  My problem is that I have a long list of params defined...

View Article

Group memebership test

Hello,i need to test for a AD User group membership and i was thinking to use this code:$aduser = Get-ADUser mariusd -Properties memberof if($aduser.MemberOf -notcontains 'CN=Group...

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

Email Notification Script is Not Working in Windows Server 2012

DearsI have Server 2012 and I wants to make new task seclude for email notification, while any user is login to the server the server will send notification email about user name and IP address for the...

View Article


Email Notification Script is Not Working in Windows Server 2012..

DearsI have Server 2012 and I wants to make new task seclude for email notification, while any user is login to the server the server will send notification email about user name and IP address for the...

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


Powershell email signature

Hi everyone,in my script, at the end of it procedures, i send a mail with the result. But i would like to add a Signature to the mail. Ho w can do it with powershell? I guess i have to create a html...

View Article

How to remove a domain user from a group in other domain?

Hi, I need to remove all groups from a domain user with powershell. The user belongs to groups in other domain in the tree. When I use "Remove-ADPrincipalGroupMembership" connected to user domain, it...

View Article

Remove-ADGroupMember where member is in parent domain and group is in child...

I have a parent domain (sandbox.local) and a child domain (child.sandbox.local) and want the capability to add and remove sandbox\User to a (domain local) group in the child domain. I can add the user...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>