使用csv文件设置AccountExpirationdate属性 [英] Setting up AccountExpirationdate attribute with csv file

查看:282
本文介绍了使用csv文件设置AccountExpirationdate属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用csv文件在PowerShell脚本中设置AD帐户到期日期。


以下是代码PowerShell:



- AccountExpirationDate
$ _ accountExpires


 


和csv文件:


accountExpires


12-25-2017


 


我没有收到任何错误,但脚本没有做任何事情。感谢您的帮助。


< p style ="margin-bottom:0cm;边距:.0001pt; line-height:normal">  


 

解决方案

-AccountExpirationDate [datetime](


_。accountExpires)


I am having trouble setting up AD account expiration date in my PowerShell scrip using csv file.

Here is the code in PowerShell:

-AccountExpirationDate $_.accountExpires

 

And csv file:

accountExpires

12-25-2017

 

I am getting no error, but the script does not do anything. I would appreciate your help.

 

 

解决方案

-AccountExpirationDate [datetime](


_.accountExpires)


这篇关于使用csv文件设置AccountExpirationdate属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆